인프런 커뮤니티 질문&답변
main()에서 계속 오답이라고 나옵니다.
작성
·
134
0
안녕하세요.
def main()에서 결과는 과제에서 요구하는대로 나오는데 계속 오답이라고 뜨네요.
이유가 무엇일까요…?? get_factorial_value와 is_positive_number는 정답이라고 나오기에 main()의 코드만 첨부합니다.
def main(): # ===Modify codes below=============
print ("Input a positive number : ")
user_input = 999
while user_input is not 0:
user_input = input()
if is_positive_number(user_input) is True:
result = get_factorial_value(int(user_input))
print(result)
return result
elif user_input is "0":
user_input = 0
else:
print("Input again, please")
print("Thank you for using this program")
# ==================================





