using python, how do you get the cube of an even number input by the user without using * and **?

1

1 Answers

Ray Dart Profile
Ray Dart answered

I'm no longer a python expert (if I ever was) - I moved to ruby some time ago, but I think you need to do something like this:

------

import math

evenNo = input("Give me an even number ")

cubeNo = math.pow(evenNo,3)

print cubeNo

------

There's loads of help out there on python - just refine the above if necessary.

Answer Question

Anonymous