Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi there, my name is Holly, I'm a maths bot")
- users_name = input("Might I ask your name? ")
- print("Welcome, " + users_name)
- print("I can calculate the area of a pizza and work out how many people it will feed")
- print("I know that the average person needs about 113 square inches of pizza") # i.e. 1 x 12" pizza
- pizza1 = input("How big is your pizza, in inches: ")
- size1 = int(pizza1)
- area = ((size1/2)**2)*3.14159
- areastr = str(area)
- numberofpeople = area/113
- numberofpeoplestr = str(numberofpeople)
- print("The area is " + areastr +" square inches")
- print("This pizza will feed " + numberofpeoplestr +" people")
- print("but tomorrow you\'ll need to go for a run!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement