code: TU04 points: 10
Where's TU03? We've hidden it because you don't need it for iGCSE and there is now an EVEN cooler way to format strings since Python 3.6. (Found later in the course at TU16)
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.
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)
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)