Dec-20-2018, 03:49 PM
You are detecting two evens correctly. Note that the other case is one or both are odd. Well, if it is not the case that both are even, then one or both are odd. There's no third possibility. So change the
The pass is not needed. If the code had gotten to that point, it would have done nothing anyway, which is what pass does.
Note that the assignment says to return a number. You are printing a number. That's not the same thing. I would replace
elif blah blah blah:
to just a plain else
.The pass is not needed. If the code had gotten to that point, it would have done nothing anyway, which is what pass does.
Note that the assignment says to return a number. You are printing a number. That's not the same thing. I would replace
print(a)
with return a
.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures