Dec-01-2018, 11:00 AM
(Dec-01-2018, 09:46 AM)kais92 Wrote: I'm using python2 because is the one that's using the course that I'm taking, maybe if I used python3 I wouldn't learn the lesson properly. If you tell me that it's better to use python3 anyway I will change it (as I don't understand the differences)The reason - python2 support ends 1 January 2020. python3 is the future. It is explained in the link I shared (at the bottom)
(Dec-01-2018, 09:46 AM)kais92 Wrote: For the query you gave me the result is not correct as the program is changing the base for the new one in each iteration.I made a mistake, not to change the range you used. It should be
base = int(input("choose a power base: ")) exp = int(input("choose a power exponent: ")) result = 1 for _ in range(exp): result *= base print(result)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs