# assign the value 12 to the base
base = 12
# assign the value 16 to the height
height = 16
# assign the results of the operation to the variable area
# the operation multiplies base by height
# assign the area of a triangle formula
area = (1/2) * (base*height)
# print the value of triangle area
print(area)
像这样:
print(area, "put unit here")
相关问题 更多 >
编程相关推荐