I have been given an assignment by my teacher in class to write a Python program that calculates the circumference and area of certain shapes. So far my first bit of code
import math
print ('Circumference and Area calculator')
def loop():
again = input ('Would you like to make any more calculations? (y/n)').lower()
if again == "y":
choice()
elif again == "n":
print ('\nGoodbye')
else:
print ('Please enter y for yes and n for no')
print ('Try again')
loop()
But when I run this module in the Python IDLE the input does not show up, and it just prints "Circumference and Area calculator". After removing def loop():
the input works, but with it it doesn't.
Would any one be able to give a solution or send me on the right path?
loop
function?python
and requests forthe right path
while
loop would work perfectly well.