Variable NUMBER MACHINE

code: TU04 points: 10

Variables only really become useful when you can play with them. For example you might want to know how much older Taylor Swift is than you. We know Taylor Swift was born in 1989. (Yes, she's really OLD!) Now all we need to know is when you were born and do the calculation.

This is what makes variables special. We can change them for what we need.

Exercise 1: Change the code for a celebrity of your choice.Exercise 2: Change the code so that you can compare any celebrity to yourself. (Hint: Line 1 needs to look a lot like line 2)

Powered by Create your own unique website with customizable templates.