Skip to content

Instantly share code, notes, and snippets.

@rodriguezcommaj
Created August 14, 2012 18:16
Show Gist options
  • Save rodriguezcommaj/3351416 to your computer and use it in GitHub Desktop.
Save rodriguezcommaj/3351416 to your computer and use it in GitHub Desktop.
Buying a Diet Coke version 2
money = int(raw_input("How much money do you have? "))
price = int(raw_input("How much is a Diet Coke? "))
leftover_money = money - price
print "So, you have %r dollars and a Diet Coke costs %r." % (money, price)
print "If you buy one, you will have %r left over." % leftover_money
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment