Skip to content

Instantly share code, notes, and snippets.

@lbattaglioli2000
Created June 20, 2016 21:44
Show Gist options
  • Save lbattaglioli2000/f06aa8afb5e84b0a659b978405dda1c5 to your computer and use it in GitHub Desktop.
Save lbattaglioli2000/f06aa8afb5e84b0a659b978405dda1c5 to your computer and use it in GitHub Desktop.
# creates a variable called money and sets it equal to the string "12.50"
money = "12.50"
# creates a variable called moneyLeft and is equal to the string money converted to a float, minus 3.
moneyLeft = float(money) - 3
# prints "Money Left: " followed by however much money they have left.
print("Money left: $" + str(moneyLeft))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment