This forum is now read-only. Please use our new forums at

Conditionals and Control Flow Forum

View Course » View Exercise

690 points
Submitted by
about 5 years ago

This exercise doesn't teach good programming practice

It says use an else statement in the general form but fails to account for situations where the number might be negative (although not applicable in the example, but negative values or even non-integers could be used - like a number written in words) or there may be something else that isn't an integer in the value.

It would be good to just teach the exercise including any possible error exceptions.

1 vote


Codeacademy give enough of their time to provide us with free guides.
You could start off with not knowing anything to being a pro. Therefore the guides are detailed enough to teach us. I think they're fine how they are.

659 points
Submitted by
Tim Cloak
almost 5 years ago