Advertisement
Guest User

Skynet simple calculator

a guest
Oct 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. print("Hi there, my name is Holly, I'm a maths bot")
  2. users_name = input("Might I ask your name? ")
  3. print("Welcome, " + users_name)
  4. print("I can calculate the area of a pizza and work out how many people it will feed")
  5. print("I know that the average person needs about 113 square inches of pizza") # i.e. 1 x 12" pizza
  6. pizza1 = input("How big is your pizza, in inches: ")
  7. size1 = int(pizza1)
  8. area = ((size1/2)**2)*3.14159
  9. areastr = str(area)
  10. numberofpeople = area/113
  11. numberofpeoplestr = str(numberofpeople)
  12.  
  13.  
  14. print("The area is " + areastr +" square inches")
  15. print("This pizza will feed " + numberofpeoplestr +" people")
  16. print("but tomorrow you\'ll need to go for a run!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement