This code activity extends on a basic understanding of the programming language Python to explore the world of image manipulation and data representation using the Python Imaging Library. The activity uses conditions and looping to edit images, and explores how more complex coding constructs can be used to efficiently manipulate every pixel in an image.
It is recommended that students have an understanding of input, if statements and for loops in Python before starting this course. Students who have completed the Beginners stream of the NCSS Challenge, Python for Beginners, or Introduction to Programming (Python) should find this an interesting next course. For new programmers we recommend completing the first 6 modules of Python for Beginners before starting.
Students will:
When you were dealing with colour images (RGB images) did you notice that it uses red, green and blue as the primary colours? It doesn't use red, yellow and blue like we use for paint.
When mixing light (like the light coming out a computer screen) colours mix differently than when you mix physical things like paint.
Light mixes using an additive colour system - when you add more colour it gets closer to the colour white.
Paint mixes using a subtractive colour system - when you add more colours of paint it gets closer to black.
You can play with mixing different colours of light here.
Take a look at the available filters on an app like Instagram. Compare a filtered image to the original.
Now you know a bit about editing colours can you come up with your own filter? Think about how you want to edit the colours, then try it out in the playground question at the end of the course.
Register as a teacher for free!
Use drag-and-drop blocks to write your own programs, learn about sequence and ordering, and create fun monster characters!
Start coding now!Learn about the differences between animals, and how Biologists use programming to help them do science! You'll use the programming language Python to classify animals based on their characteristics.
Start coding now!This Cyber Security Mini course is a short introduction to staying safe online. You'll learn about secure passwords, phishing, security settings, social media and more!
Start coding now!Use the programming language Python to build a friendly chatbot called "Eliza". Can she fool your friends into thinking she's a human?
Start coding now!Use the programming language Python and instruct a turtle to draw flags from around the world! How many countries do you know?
Start coding now!A Navy captain is held captive inside his ship. A major landmark has gone dark. And weapons are pointed at Sydney’s busiest sites… It’s all connected, and it’s up to you to free the captain, track down the culprit, and stop them. Students will need to trace clues, solve puzzles, and figure out how to stop a large scale simulated cyber attack before it’s too late.
Start coding now!Use the programming language Python and instruct a turtle to draw fantastic snowflakes with code! Brrr, is it getting cold in here?
Start coding now!Build programs using friendly blocks and instruct a turtle to draw fantastic snowflakes with code! Brrr, is it getting cold in here?
Start coding now!Get started with the BBC micro:bit. Use the Python programming language to make a pet that you can feed and play with! No micro:bit required.
Start coding now!Get started with the BBC micro:bit. Use friendly blocks to make a virtual pet that you can feed and play with! No micro:bit required.
Start coding now!This activity is designed to introduce branching. Use the Blockly version of Python and its turtle module to draw and colour hydrangea flowers!
Start coding now!Ever wanted to create your own emoticon? Use the programming language Python to explore emoticons and text manipulation.
Start coding now!Use the visual programming language Blockly to investigate space and reach for the stars.
Start coding now!Use the programming language Python to model a disease outbreak. Can you solve the curious case of the glowing nose?
Start coding now!Use the programming language Python to create a simple game (or MUD). Can you find your way through the dark tunnel?
Start coding now!