2014-09-06 2 views

답변

2

의 원인이 무엇 :이 코드를 실행하면 그러나 나는 TypeError

number = input(enter a number) 
    if(number%2 == 0): 
     print('obviously',number, 'is even') #conditional that prints the number and a statment 

    else: 
     print('obviously', number, 'is odd'); 

내 질문은 얻을. 문자열에 모듈로를 수행 할 수 없습니다. 그래서 그것을 정수로 만들어야합니다.

number = int(input('Enter a number:')) 
관련 문제