SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Destacado

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
 

Destacado (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
 

Último

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

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

Notas del editor

  1. Remember to hide the sprite from the screen