SlideShare une entreprise Scribd logo
1  sur  7
Variables

 Add a variable
 called “number”



Exercise:
Say a random number




                               1
Conditions

Exercise:
  – What does
    this code do?
  – What are the
    errors in the
    code?
  – If you have
    any questions
    then ask the
    demonstrators      2
Conditions

Exercise:
  – What does
    this code do?
  – What are the
    errors in the
    code?
  – What if
    “number” is
    equal to 5?
                        3
More motion action

• Exercise
  – Make the sprite go to x=0, y=0
• Exercise
  – Make the sprite move 100 steps and turn 90 degrees
• Exercise
  – Make the sprite go in a square pattern
• Exercise
  – Make the sprite move when you hit a key




                                               4
Iteration

     • Repeat statements
     • Exercise:
       Guess what this
       code does
     • Test your guess




               5
Loop exercises
• Exercise: Draw this (10 diamonds)




• Exercise: Try to write your programs with as few statements as
  possible




                                                  6
More repeating exercises

•   Exercise: Draw this in any colour




•   Exercise: Change the colour of each square
•   Exercise: Draw a triangle, a pentagon a hexagon
    and a circle.

                                         7

Contenu connexe

En vedette

Scratch Lesson 3 - Interactivity
Scratch Lesson 3 -  InteractivityScratch Lesson 3 -  Interactivity
Scratch Lesson 3 - InteractivityDavid Oromaner
 
Scratch Lesson 2 – Paint Editor
Scratch Lesson 2 – Paint EditorScratch Lesson 2 – Paint Editor
Scratch Lesson 2 – Paint EditorDavid Oromaner
 
Lesson 1: scratch basics
Lesson 1: scratch basicsLesson 1: scratch basics
Lesson 1: scratch basicsjonathanbyrne
 
An Urban Adventure in Project-Based Learning
An Urban Adventure in Project-Based LearningAn Urban Adventure in Project-Based Learning
An Urban Adventure in Project-Based LearningPatrick Woessner
 
Creative Teaching with Scratch 2010
Creative Teaching with Scratch 2010Creative Teaching with Scratch 2010
Creative Teaching with Scratch 2010Douglas Kiang
 
Programming with Scratch
Programming with ScratchProgramming with Scratch
Programming with ScratchCort1026
 
Scratch project ideas
Scratch project ideasScratch project ideas
Scratch project ideasDavid Noble
 
Programming in scratch
Programming in scratchProgramming in scratch
Programming in scratchHussam Mostafa
 
Scratch in the Classroom
Scratch in the ClassroomScratch in the Classroom
Scratch in the ClassroomDarrel Branson
 
Creative Teaching with Scratch
Creative Teaching with ScratchCreative Teaching with Scratch
Creative Teaching with ScratchDouglas Kiang
 

En vedette (20)

Scratch Lesson 3 - Interactivity
Scratch Lesson 3 -  InteractivityScratch Lesson 3 -  Interactivity
Scratch Lesson 3 - Interactivity
 
Scratch Lesson 2 – Paint Editor
Scratch Lesson 2 – Paint EditorScratch Lesson 2 – Paint Editor
Scratch Lesson 2 – Paint Editor
 
Lesson 1: scratch basics
Lesson 1: scratch basicsLesson 1: scratch basics
Lesson 1: scratch basics
 
Scratch Lesson 5
Scratch Lesson 5Scratch Lesson 5
Scratch Lesson 5
 
Scratch Lesson 3
Scratch Lesson 3Scratch Lesson 3
Scratch Lesson 3
 
Scratch Lesson 4
Scratch Lesson 4Scratch Lesson 4
Scratch Lesson 4
 
Scratch Lesson 6
Scratch Lesson 6Scratch Lesson 6
Scratch Lesson 6
 
Scratch Lesson 1
Scratch Lesson 1Scratch Lesson 1
Scratch Lesson 1
 
Scratch Lesson 2
Scratch Lesson 2Scratch Lesson 2
Scratch Lesson 2
 
An Urban Adventure in Project-Based Learning
An Urban Adventure in Project-Based LearningAn Urban Adventure in Project-Based Learning
An Urban Adventure in Project-Based Learning
 
Scratch2
Scratch2Scratch2
Scratch2
 
Creative Teaching with Scratch 2010
Creative Teaching with Scratch 2010Creative Teaching with Scratch 2010
Creative Teaching with Scratch 2010
 
Programming with Scratch
Programming with ScratchProgramming with Scratch
Programming with Scratch
 
Citizenship Digital Age
Citizenship Digital AgeCitizenship Digital Age
Citizenship Digital Age
 
Scratch project ideas
Scratch project ideasScratch project ideas
Scratch project ideas
 
Scratch Basics
Scratch BasicsScratch Basics
Scratch Basics
 
Programming in scratch
Programming in scratchProgramming in scratch
Programming in scratch
 
Scratch in the Classroom
Scratch in the ClassroomScratch in the Classroom
Scratch in the Classroom
 
Intro To Scratch
Intro To ScratchIntro To Scratch
Intro To Scratch
 
Creative Teaching with Scratch
Creative Teaching with ScratchCreative Teaching with Scratch
Creative Teaching with Scratch
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Dernier (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Learn programming fundamentals with variables, conditions and loops

  • 1. Variables Add a variable called “number” Exercise: Say a random number 1
  • 2. Conditions Exercise: – What does this code do? – What are the errors in the code? – If you have any questions then ask the demonstrators 2
  • 3. Conditions Exercise: – What does this code do? – What are the errors in the code? – What if “number” is equal to 5? 3
  • 4. More motion action • Exercise – Make the sprite go to x=0, y=0 • Exercise – Make the sprite move 100 steps and turn 90 degrees • Exercise – Make the sprite go in a square pattern • Exercise – Make the sprite move when you hit a key 4
  • 5. Iteration • Repeat statements • Exercise: Guess what this code does • Test your guess 5
  • 6. Loop exercises • Exercise: Draw this (10 diamonds) • Exercise: Try to write your programs with as few statements as possible 6
  • 7. More repeating exercises • Exercise: Draw this in any colour • Exercise: Change the colour of each square • Exercise: Draw a triangle, a pentagon a hexagon and a circle. 7

Notes de l'éditeur

  1. Remember to hide the sprite from the screen