[Tutor] Calculate 4**9 without using **, was Re: QUESTION
Peter Otten
__peter__ at web.de
Sat Mar 4 03:50:53 EST 2017
Tasha Burman wrote:
> Hello python tutors,
> I am having difficulty with a power function; what is another way I can do
> 4**9 without using **? Thanks,
Hello Tasha,
"what is another way I can do 4**9 without using **?"
sounds a lot like a homework question -- so you really have to think about
it yourself a bit. A few hints:
How would you do the calculation with pen and paper?
Can you translate that into a Python loop? What kind of loop would you
choose to repeat something 9 times?
If you are still having difficulties come back here and show us the code you
have tried, even if it doesn't work yet.
More information about the Tutor
mailing list