Modelling levels - 3
Q1. Did you have a go writing the program for yourself using the algorithm before looking at this solution? If you haven't got a working solution yet, type this in and get it working. When you run this program, you might find that the 'shell' window is on top of the game window where the dots are. You can resize the shell in Idle by going to OPTIONS - CONFIGURE IDLE - OPTIONS and change the numbers in the 'Initial window size' area.
Q2. Ensure you test all three levels to make sure they work.
Q3. Try changing size and speed in the levels. What are the maximum values for the numbers? What are the minimum? Can you have negative numbers?
Q4. Try out different colours. What different colours can you use if you use words? Are there other ways of entering in a colour? (HINT: The answer is yes. Do some research and find out how else you could enter a colour.)
Q5. Try different window sizes and positions. (Look up the documentation in the Python turtle documents.)
Q6. Modify your program so that the Y coordinate is changed as well as the X coordinate.
Q7. Add an extra level to your program and try that out.
Q8. Try adding some different sounds to each level. Refer back to the Pelican Crossing code to remind yourself how to use sound in Windows.
Q9. Can you think of something else that you might alter, depending on what level is being played? Change your program accordingly.
Q10. If you have written a game in Scratch, think about how you might add levels now using the techniques you have learnt here and have a go at adding levels to your game.