This question already has an answer here:
so i'm making a pizza program in Python 3.3 that takes input from the user and prints the amount of pizza's needed. Every pizza is cut into 8 slices. So it works like this: You input the amount of people coming to the party, and how many pieces EVERYONE will eat on average. The computer then tells you how many pizza's you need to order. My problem is, say 10 people are coming to the party, and they will eat 2 pieces each on average. The computer gives me 2.5, and I need to find a way for it to round to the nearest full number up. See what I mean? Here is my code so far
eaters = input("How many people are attending the party?") pieces = input("How many pieces will everyone eat on average?") pizzas = float(eaters) * float(pieces) orders_needed = pizzas/8 print(orders_needed)
Any ideas on how I can do this?