Below is some code that has been deliberately broken so that you can fix it.
The code is supposed to draw a snowman with an orange nose and two eyes:
- Fix the syntax errors
Hint: parameters need be surrounded by brackets and separated by commas
- Change the nose to
Hint: This is a logic error. The code runs (so it can’t be a syntax error) and doesn’t crash (so it’s not a runtime error).
- Add the missing eye so it’s symmetrical
Hint: The coordinates (0,0) are in the middle. Positive coordinates go left and up from the middle.
On the next page you’ll get some ideas for projects where you can use functions in your own projects