25th Jan 2020, 7:50 PM
Baran Aldemir
Baran Aldemir - avatar
4 ответов
+ 5
If you write a try, you also have to write except. Do it just like this: def isiteven(number): if (number % 2 == 0): return number else: raise ValueError
25th Jan 2020, 8:01 PM
HonFu
HonFu - avatar
+ 3
Thanks guys. Appreciate it.
25th Jan 2020, 8:03 PM
Baran Aldemir
Baran Aldemir - avatar
+ 2
Because you did not finish the try statement. try statement should always be followed by except or finally statement, otherwise it has no meaning.
25th Jan 2020, 8:02 PM
Seb TheS
Seb TheS - avatar
+ 1
HonFu some help here
25th Jan 2020, 7:58 PM
✳AsterisK✳
✳AsterisK✳ - avatar