Exercise: level 2 |day 11 funtions
Author: mygit3ayoCreated Aug 28, 2026Updated Aug 28, 2026
Huge thanks to Asabeneh on creating this dedicated 30 days python challenge.
Exercise given in this day 11 labelled as 'Exercise level:2'
question no. 1 expects this:-
print(evens_and_odds(100))
# The number of odds are 50.
# The number of evens are 51.
but here when we count manually numbers of odds and even we get 50 odds and 50 evens, 0 is neither odd or even. while this looks like a minor problem the code(answer to exercise) will run would not show exactly as commented.
the fix: editing second comment to ' # The number of evens are 50.' this helps someone for figuring out how to solve this exercise
Source: Asabeneh/30-Days-Of-Python