You are on page 1of 3

Write a program to calculate the area of a triangle.

The program must ask the user to enter the base and
height and then output the area.
[5]

1.height= int(input("enter the height"))


base= int(input("enter the base"))
x=2
area= (int(base *height/x))
print(int(base*height/x))
print ("the area is",area)

2. print(range(100))
smallest=int(input("enter the smallest"))
largest=int(input("enter the largest"))
print('smallest < largest is', smallest<largest)
numlist = [60,75,88,99,100,21,34]
n = len(numlist)
total = sum(numlist)
average = total/n
print(" Average is: " + str(average))
not yet ready there are still errors
3. input1 = input()
print(type(input1))
input2 = input()
print(type(input2))
input3 = input()
print(type(input3))
input4 = input()
print(type(input4))
numlist = ("input1","input2","input3","input4")
n = len(numlist)
total =sum(numlist)
average = total/n
print("Average is :" + str(average))

You might also like