Im a student, and just started learning python a month back, so right now, I have only learnt the basics. My teacher had given me a question like this, and the problem is, I dont know how to rerun a program, suppose, after finding the area of a particular shape, I want it to loop back to printing the first statement. Is there any way of doing that without re-running the program using the "F5" key?
print "1. Triangle"
print "2. Circle"
print "3. Rectangle"
shape= input("Please Select the serial number =")
if shape==1:
a=input("Base =")
b=input("Height =")
area=0.5*a*b
print area
if shape==2:
a=input("Radius =")
area=3.14*a*a
print area
if shape==3:
a=input("Width")
b=input("Length")
area=a*b
print area