Need help with 2 simple things
Hi, I just started learning programming and I was told that Python was good for beginners, and after solving just a few problems I'm already stuck...
I'm suppose to make a function that counts down from the number entered and then up again. Using recursion (if). I can make it go either up or down but not both in one function.
For example if i enter 4 it should do this:
4 3 2 1 0 1 2 3 4
The next problem is the same but using iteration (while) instead of recursion.
I know this must be so easy but the answer eludes me. Thanks!
|