Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi! I am SPEA, your personal bot. ")
- print("NB:SPEA=square perimeter and area")
- userName = input("Can you tell me your name, please? ")
- print("Nice to meet you! " + userName)
- print("Let's calculate the area and perimeter of a square")
- input1 = input("Length>")
- input2 = input("Width>")
- item1 = int(input1)
- item2 = int(input2)
- result1 = item1 * item2
- result2 = (item1 * 2) + (item2 * 2)
- output1 = str(result1)
- output2 = str(result2)
- print("Area = " + input1 + " * " + input2 + " = " + output1)
- print("Area = " + output1 + "units squared")
- print("Perimeter = " + "2" + "*" + "(" + input1 + " + " + input2 + " )" + " =" + output2)
- print("Perimeter = " + output2 + "units")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement