Last active
December 19, 2015 14:48
-
-
Save nicholsonjf/5971400 to your computer and use it in GitHub Desktop.
I'm planning a friend's bachelor party. 16 people are invited. To RSVP and come, the price is $150. If you can't come but still want the t-shirt we designed for the bachelor party, it's $35. This Python function calculates what the return is depending on how many people RSVP and how many only buy the shirt.
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
def steve(x,y): | |
"""where x is buyers of shirts and y is number of RSVPs""" | |
js = x * 35 | |
rsvp = y * 150 | |
total = jt + rsvp | |
print "Money from shirts: $" + str(js) | |
print "Money from RSVPs: $" + str(rsvp) | |
print "Total: $" + str(total) | |
steve(7,9) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment