Python Intro Year 8 WK 7
Python Intro Year 8 WK 7
Python
Data types
Topic: Introduction to text based programming language Oct 2024
Starter
Data types in programming
https://www.youtube.com/watch?v=tdv3a_jz2G4
Learning Objectives Key Words
By the end of this class • Data types
• I should be able to identify different data types • Constants
• I should be able to explain the function of these • Variables
data types
• I should be able to explain the importance of these
data types.
Topic: Introduction to text based programming language Oct 2024
Guide
• https://365datascience.com/tutorials/python-t
utorials/data-types-python/
Activity
• Create a PowerPoint presentation listing the data types
in python and explain their functions.
Topic: Introduction to text based programming language Oct 2024
Plenary
Topic: Introduction to text based programming language Oct 2024
Starter Period II
•
Step 1 – Click on ‘Create’ on the top left of the scratch home page.
Step 2 – Setting up a scene: Delete the default cat sprite by clicking on the dustbin icon next to the sprite.
Step 3 – Click on ‘Choose a Backdrop’ in the bottom right corner.
Step 4 – Search for the ‘Farm’ background in the search bar and select the background.
Step 5 – Now let’s choose a sprite by clicking on ‘choose a sprite.’
Step 6 – Search for the ‘Rooster’ sprite in the search bar and select the sprite.
Step 7 – Decrease the size of the Rooster sprite to ‘50’. You can do that by changing the value of size from the size box.
Step 8 – Bring the cursor to the Rooster. Drag and drop the Rooster at the entrance of the hut.
Step 6 – Add code to your project: Drag and drop the ‘When green flag clicked’ block from the Events section into the
script area. This block will trigger the execution of code.
Step 7 – Now attach the ‘Start sound’ to the event block. This block will add sound to our project.
Step 8 – Now go to the ‘control’ section drag and drop the ‘forever’ bloc and attach it below the start sound block.
• Step 9 – Drag and drop the ‘Next costume’ block from the ‘looks’ section and attach it inside the forever block. This block
will change the costume of the ‘Rooster’ sprite.
• Step 10 – Take the ‘Wait 1 second’ block from the control section and attach it below the ‘Next costume’ block. You can
change the value from 1 to 0.2. This block makes sure that the Rooster sprite changes the costume with a wait of 0.2
seconds.
Step 11 – Now let’s make the Rooster move. Drag the ‘move 10 steps’ blocks from the motion section and place it below
the wait block. Change the value of 10 to 2. This will make the Rooster sprite move 2 steps at a time.
Step 12 – Run the project: Click on the green flag to run your project. Click on the ‘Red ’ button next to the green flag to
stop the project.
Step 13 – Rename your project: Give a name to your project.
Activity link – https://scratch.mit.edu/projects/740173768