from time import sleep
h = input("Enter the height of the triangle (cm): ")
w = input("Enter the base of the triangle (cm): ")
print "Height =",
print h
print "Width =",
print w
area = (w * h)
area = area/2
print "The area of the triangle is =",
print area,
print "cm2"
print "This program will close in 10 Seconds"
sleep(10)
I have worked out I need to make "area" a float type variable. Sadly unlike C++ I don't know how to define this. I have looked in the user guide and can find no references to this. Thanks in Advanced
bbqroast


Sign In
Create Account


Back to top









