Do we need the else statemet if we do not change any variable?
In the solution the else statement does not modify the variable
is it needed or can we omit it?
Thanks for reaching out.
Yes, this exercise could be solved without these two lines of code, that's right. However, best practices require to leave code that is visible for other readers what will happen to the base value in case the if statement has not been satisfied. Hence, the version we've left as a solution to our exercise.
Hope this helps.