Lærerveiledning - Stjerner og galakser

Introduction:

This project teaches functions and parameter passing, by creating and using functions to draw customisable shapes and patterns.

Resources

For this project, Python will need to be installed. It is recommended that version 3.2 of Python is installed.

Children can also make use of the materials which accompany these challenges. Files included in the 'Project Resources' folder (found under the 'Download Project Materials' link):

  • Sky.py

Make sure that each child has read and write access to their own copy of these resources.

You can find a completed version of this project's challenges by clicking the 'Download Project Materials' link for this project, which contains:

  • ConstellationFinished.py
  • Clouds.py

Learning Objectives

  • Functions and the def keyword;
  • Passing parameters to functions;
  • Additional turtle functions.

Challenges

  • More functions - defining and calling functions;
  • Drawing planets - defining and calling parameterised functions;
  • Functions everywhere! - using functions to draw images.

Frequently Asked Questions

  • Depending on where the file is saved, naming a program 'turtle.py' can cuase problems, as it clashes with the turtle module, which is also called 'turtle.py'.
  • There can sometimes be problems when trying to close the turtle drawing canvas. The line done() at the end of each program should help, but if the window freezes you can close the shell window, which should terminate the program.

Forbedre denne siden

Funnet en feil? Kunne noe vært bedre? Hvis ja, vennligst gi oss tilbakemelding ved å lage en sak på Github eller fiks feilen selv om du kan. Vi er takknemlige for enhver tilbakemelding!

Rapporter et problemVis koden og fiks selv