0

With the programme run,finally it will become 0,why if it is 23,it will output false?

21st Apr 2019, 8:57 AM
lau chun hin
4 Réponses
0
def is_even(x): if x == 0: return True else: return is_odd(x-1) def is_odd(x): return not is_even(x) print(is_odd(17)) print(is_even(23))
21st Apr 2019, 9:04 AM
lau chun hin
0
Thank you very much
21st Apr 2019, 9:05 AM
lau chun hin