Wednesday, May 21, 2014

Day 46

Explored Python at CodeCademy. Worked on Python tutorial 4 of 5, Tip Calculator, Reassign A Variable. Changed a variable "meal" with itself plus itself times the variable "tax."

The code used:
# Reassign meal to the value of itself + itself * tax
meal = 44.50
tax = 0.0675
tip = 0.15
meal = meal + meal * tax

There was no interaction, the code simply changed a variable to a new value.

No comments:

Post a Comment