This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import ceil | |
# Write a function called numPizzas, that takes the number of people present, | |
# the number of slices in a pizza, and the time of day, and returns the | |
# number of pizzas to buy (as a whole integer). | |
# | |
# Spec: | |
# Signature: int numPizzas(int numPeople, int slicesPerPizza, int time) | |
# Time is an int on 24-hour clock (0-23), e.g. 8 = 8am, 14 = 2pm | |
# 11 = 11am 11pm = 23 |