Python 7 Levels, L1, Unit 6, Data Input

Powered By EmbedPress

Exercise 1:

name = input("Please input your name:")
print("Your name is: ",name)

Exercise 2:

print("This is a rectangular area calculation program. The units of length and width are meters, and the unit of area is square meters.")
length = int(input("Please input length of the rectangle:"))
width = int(input("Please input width of the rectangle:"))
acreage = length*width
print("Length is ",length,", width is ",width,", area is ",acreage)

dahan1999

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts