Skip to content

Instantly share code, notes, and snippets.

@lee2sman
Last active September 18, 2016 23:20
Show Gist options
  • Save lee2sman/7cdb752f836b3cc59217 to your computer and use it in GitHub Desktop.
Save lee2sman/7cdb752f836b3cc59217 to your computer and use it in GitHub Desktop.
pizza calculator
#!/usr/bin/env python
#pizza.py
#is a pizza pie calculator
#It determines how many pizzas you need to purchase dependent on number of people that will consume pizza.
#Assumes standard hungry person eats 3 slices. Rounds up so there is leftover pizza.
#Lee 2sman April 2015
import math
print("Pizza calculator")
people = input("How many people are there? ")
people = people*3/8
people = int(math.ceil(people))
print("You need "+str(people)+" pizzas.")
pizza="""
___
| ~~--.
|%=@%%/
|o%%%/
__ |%%o/
_,--~~ | |(_/ ._
,/' m%%%%| |o/ / `\.
/' m%%o(_)%| |/ /o%%m `\
/' %%@=%o%%%o| /(_)o%%% `\
/ %o%%%%%=@%%| /%%o%%@=%% \
| (_)%(_)%%o%%| /%%%=@(_)%%% |
| %%o%%%%o%%%(_|/%o%%o%%%%o%%% |
| %%o%(_)%%%%%o%(_)%%%o%%o%o%% |
| (_)%%=@%(_)%o%o%%(_)%o(_)% |
\ ~%%o%%%%%o%o%=@%%o%%@%%o%~ /
\. ~o%%(_)%%%o%(_)%%(_)o~ ,/
\_ ~o%=@%(_)%o%%(_)%~ _/
`\_~~o%%%o%%%%%~~_/'
`--..____,,--' """
print(pizza)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment