Python-Programming-Lesson-Notes

Episode 1 Exercise 1

What values do the variables mass and age have after each of the following statements? Test your answer by executing the lines.

mass = 47.65
age = 122
mass = mass * 2.0
age = age - 20
Solution Output
`mass` holds a value of 47.65, `age` does not exist
`mass` still holds a value of 47.65, `age` holds a value of 122
`mass` now has a value of 95.0, `age`'s value is still 122
`mass` still has a value of 95.0, `age` now holds 102

Episode 1 Exercise 2