Put together all the coding elements you have learned so far to create your own computer generated modern art. Use your new coding skills to bring your own ideas for computer generated images to life.
Digital pictures out of code like this one:
By making pictures with code you will learn how to:
Use functions to write code that you can use over and over again
Generate random numbers to alter shapes, colours, coordinates and directions
Use # to turn bits of code off or to make comments in your code
Use many different shapes and colours together to create your own computer generated images
A computer or tablet capable of accessing the online interactive Python environment called Trinket. You can create a trinket.io account using your google school account; or
If you don’t want to create an account you can use the embedded interactive trinkets below to run code and see what happens; or
You can use a computer that has the Python programme installed.
Sign in to your trinket.io account, click on your name and then select ‘New Trinket’ and ‘Python’ from the drop-down menus.
Use this link to go to the Code Club online project: projects.raspberrypi.org/en/projects/modern-art
Follow each step in the project, type code into your own trinket. You can look at the embedded trinket below for help if you get stuck.
You will see another new way to import the Turtle library, from turtle import * imports all the turtle functions and means you no longer need to type turtle. or t. in front of the commands e.g. you can now type forward(100) instead of t.forward(100). The same applies when we import the random module.
Use what you have learned about creating functions to draw shapes to make your own computer generated pictures. Below are trinkets for two ideas I had about drawing smiley faces and a house.
Maybe you could make a boat, a train, a flower, a diagram of the solar system, the choices are endless!