Rename the Palace (Exercise)
00:00
Apparently, the party is over, and it was a great success. Thanks to your work, and since the party was such a great success, you decide to rename the ‘Python Palace’ into Mouse House
.
00:12 For nostalgic reasons, you want to keep the old address sign around. So let’s have a look at the code.
00:19
You need to adjust the code below so the last line of the program prints Mouse House
, keep the line address = "Python Palace"
untouched.
00:30
This seems at first hand like an exercise you already had, where you wanted to print Cookie Cabinet
as the address, but this is slightly different. This time, you want to print Mouse House
in the last line.
00:44
So the solution is a little bit different. And the code that you’re seeing here is basically the solution that you had in exactly that exercise where you added Cookie Cabinet
as the global address.
00:58 So you need to adjust this code a bit to make it work. Now, you could just put a global address, but you already saw better ways in this course. So try to use parameters and return statements to solve this exercise.
01:13 You can find the code of this slide in the supporting materials and work on the exercise yourself. And once you’re ready, hop over to the next lesson where you see how I solve it.
Become a Member to join the conversation.