- 1
Write an algorithm to find the given number is odd or even
answer
4 ответов
+ 6
def is_even(num):
if (num % 2) == 0:
return True
return False
+ 6
print(["even", "odd"][int(input()) % 2])
https://code.sololearn.com/cXggOMfL00hB/?ref=app
+ 2
print('It is even' if int(input()) % 2 == 0 else "It is odd")
https://code.sololearn.com/cA2320m4lG03/?ref=app