Class 3 Exam  >  Class 3 Notes  >  Year 3 Computing IGCSE (Cambridge)  >  Chapter Notes: Be a Designer

Be a Designer Chapter Notes | Year 3 Computing IGCSE (Cambridge) - Class 3 PDF Download

Programs with multiple algorithms

  • A computer can execute multiple programs simultaneously, such as running a web browser and a word processing program at the same time.
  • In this unit, students will create programs with multiple algorithms using Scratch, a block-based programming environment.
  • Students will learn:
    • That efficient algorithms are concise, using the fewest steps to solve a problem.
    • To identify steps that are repeated in tasks, enabling optimization of algorithms.
    • To create programs that run more than one algorithm concurrently.
    • To develop programs that reset objects to their initial states.

Efficient algorithms

  • An algorithm is a series of instructions designed to solve a specific problem.
  • Different algorithms can solve the same problem, but their efficiency varies based on the number of steps required.
  • Efficient algorithms are concise, meaning they use the least number of steps to achieve the desired outcome.
  • Example: A frog needs to move five steps to reach a pond. Three different algorithms are presented:
    • Algorithm 1:
      StepInstruction
      1Start program
      2Jump 1 step forward
      3Jump 1 step forward
      4Jump 1 step forward
      5Jump 1 step forward
      6Jump 1 step forward
      7Stop program
      • Total steps: 7
      • Instructs the frog to jump one step at a time, five times.
    • Algorithm 2:
      StepInstruction
      1Start program
      2Jump 3 steps forward
      3Jump 2 steps forward
      4Stop program
      • Total steps: 4
      • Instructs the frog to jump three steps, then two steps.
    • Algorithm 3:
      StepInstruction
      1Start program
      2Move 5 steps forward
      3Stop program
      • Total steps: 3
      • Instructs the frog to move five steps in one go.
  • Comparison:
    • All three algorithms solve the problem of moving the frog to the pond.
    • Algorithm 3 is the most efficient because it requires only three steps, compared to four steps in Algorithm 2 and seven steps in Algorithm 1.

Repetition in tasks

  • A repetitive task involves actions that are performed multiple times to achieve a goal.
  • Example: Riding a bicycle involves repeated actions to keep moving forward.
    • Steps for riding a bicycle:
      1. Put on elbow and knee pads.
      2. Put on helmet.
      3. Get on bicycle. Place left foot on the left pedal and push off the ground using the right foot.
      4. Use the left foot to push down on left pedal.
      5. Use right foot to push down on right pedal.
      6. Repeat steps 4 and 5 to continue pedaling to move the bicycle forward.
    • Repeated steps:
      • Pushing down using the left foot on the left pedal.
      • Pushing down using the right foot on the right pedal.
    • If these steps are not repeated, the bicycle will stop moving.
  • Keyword:
    • Repetitive: Doing the same action over and over again to complete a task.

Coding with multiple algorithms

  • Scratch can be used to create programs where multiple algorithms run simultaneously, controlling different sprites in a project.
  • Example: Creating a program for a Batter hitting a baseball, involving two sprites (Batter and Baseball) with separate algorithms.
    • Algorithm A (Batter):
      StepInstruction
      1Start program when up arrow key is pressed
      2Set batter position to x = 32, y = 69
      3Switch costume to batter-b
      4Wait 1 second
      5Switch costume to batter-c
      6Stop program
      • Steps to create the program in Scratch:
        1. Create a new Scratch project and delete Sprite 1.
        2. Select the Baseball 1 backdrop.
        3. Add the Batter sprite.
        4. Use the "when () key pressed" block (Events group) and set it to "up arrow."
        5. Add the "go to x, y" block (Motion group) and set x to 32, y to 69.
        6. Add the "switch costume to" block (Looks group) and select "batter-b."
        7. Add the "wait () seconds" block (Control group) with 1 second.
        8. Add another "switch costume to" block and select "batter-c."
    • Algorithm B (Baseball):
      StepInstruction
      1Start program when up arrow key is pressed
      2Set baseball position to x = –6, y = –136
      3Set size to 70%
      4Glide 1 second to x = –30, y = 65
      5Wait 1 second
      6Glide 1 second to a random position
      7Stop program
      • Steps to create the program in Scratch:
        1. Add the Baseball sprite.
        2. Use the "when () key pressed" block and set it to "up arrow."
        3. Add the "go to x, y" block and set x to –6, y to –136.
        4. Add the "set size to" block (Looks group) and set it to 70%.
        5. Add the "glide () secs to x, y" block (Motion group) and set it to 1 second, x to –30, y to 65.
        6. Add the "wait () seconds" block with 1 second.
        7. Add the "glide () secs to ()" block set to 1 second and random position.
  • Program execution:
    • When the up arrow key is pressed, both Algorithm A and Algorithm B run simultaneously.
    • The Baseball glides toward the Batter for 1 second, waits 1 second, then glides to a random position.
    • The Batter waits 1 second for the ball to reach the bat, then switches to the batter-c costume to simulate hitting the ball.

Create a program for two children jumping on a trampoline

  • This section involves creating a Scratch program where two sprites, Dan and Anina, jump on a trampoline simultaneously when the space key is pressed.
  • Both sprites must start at their designated positions and jump in sync.
  • Algorithm E (Dan):
    StepInstruction
    1Start program when space key is pressed
    2Set Dan’s position to x = –85, y = 5
    3Glide 1 second to x = –85, y = 80
    4Switch costume to dan-b
    5Turn right 180 degrees
    6Wait 1 second
    7Turn left 180 degrees
    8Glide 1 second to x = –85, y = 5
    9Switch costume to dan-a
    10Stop program
    • Steps to create the program in Scratch for Dan:
      1. Add the "when () key pressed" block (Events group) and set it to "space."
      2. Add the "go to x, y" block (Motion group) and set x to –85, y to 5.
      3. Add the "glide () secs to x, y" block (Motion group) and set it to 1 second, x to –85, y to 80.
      4. Add the "switch costume to" block (Looks group) and select "dan-b."
      5. Add the "turn right () degrees" block (Motion group) and set it to 180 degrees.
      6. Add the "wait () seconds" block (Control group) with 1 second.
      7. Add the "turn left () degrees" block (Motion group) and set it to 180 degrees.
      8. Add another "glide () secs to x, y" block and set it to 1 second, x to –85, y to 5.
      9. Add another "switch costume to" block and select "dan-a."
  • Algorithm F (Anina Dance):
    StepInstruction
    1Start program when space key is pressed
    2Set Anina’s position to x = 30, y = 7
    3Glide 1 second to x = 30, y = 80
    4Switch costume to anina pop front
    5Wait 1 second
    6Glide 1 second to x = 30, y = 7
    7Switch costume to anina pop stand
    8Stop program
    • Steps to create the program in Scratch for Anina Dance:
      1. Add the "when () key pressed" block and set it to "space."
      2. Add the "go to x, y" block and set x to 30, y to 7.
      3. Add the "glide () secs to x, y" block and set it to 1 second, x to 30, y to 80.
      4. Add the "switch costume to" block and select "anina pop front."
      5. Add the "wait () seconds" block with 1 second.
      6. Add another "glide () secs to x, y" block and set it to 1 second, x to 30, y to 7.
      7. Add another "switch costume to" block and select "anina pop stand."
  • Algorithm for the Trampoline:
    StepInstruction
    1Start program when space key is pressed
    2Set position to x = −9, y = −109
    • Steps to create the program in Scratch for the Trampoline:
      1. Add the "when () key pressed" block and set it to "space."
      2. Add the "go to x, y" block and set x to −9, y to −109.
  • Steps to create the full program in Scratch:
    1. Create a new Scratch project and delete Sprite 1.
    2. Select the Playing Field backdrop.
    3. Add the Trampoline sprite and implement its code.
    4. Add the Dan sprite and implement Algorithm E’s code.
    5. Add the Anina Dance sprite and implement Algorithm F’s code.
    6. Run the program by pressing the space key.
  • Program execution:
    • When the space key is pressed, all three algorithms (E, F, and Trampoline) run simultaneously.
    • Dan and Anina move to their starting positions, glide upward to simulate a jump, change costumes, and return to their original positions.
    • The trampoline remains static at its designated position.

Create a program for a rabbit, lion and zebra racing through the woods

  • This section involves creating a Scratch program where three sprites (Rabbit, Lion, Zebra) race through the woods when any key is pressed.
  • All sprites must start at their designated positions and begin racing simultaneously.
  • Algorithm M (Rabbit):
    StepInstruction
    1Start program when any key is pressed
    2Set Rabbit’s position to x = –190, y = –140
    3Switch costume to rabbit-a
    4Wait 1 second
    5Move 100 steps
    6Switch costume to rabbit-b
    7Wait 1 second
    8Move 100 steps
    9Switch costume to rabbit-a
    10Wait 1 second
    11Move 100 steps
    12Switch costume to rabbit-b
    13Wait 1 second
    14Move 100 steps
    15Switch costume to rabbit-a
    16Stop program
    • Steps to create the program in Scratch for Rabbit:
      1. Add the "when () key pressed" block (Events group) and set it to "any."
      2. Add the "go to x, y" block (Motion group) and set x to –190, y to –140.
      3. Add the "switch costume to" block (Looks group) and select "rabbit-a."
      4. Add the "wait () seconds" block (Control group) with 1 second.
      5. Add the "move () steps" block (Motion group) and set it to 100 steps.
      6. Add the "switch costume to" block and select "rabbit-b."
      7. Repeat the sequence of wait, move, and switch costume blocks as per the algorithm.
  • Algorithm N (Lion):
    StepInstruction
    1Start program when any key is pressed
    2Set Lion’s position to x = –210, y = –60
    3Switch costume to lion-a
    4Wait 1 second
    5Move 200 steps
    6Switch costume to lion-b
    7Wait 1 second
    8Move 200 steps
    9Switch costume to lion-c
    10Stop program
    • Steps to create the program in Scratch for Lion:
      1. Add the "when () key pressed" block and set it to "any."
      2. Add the "go to x, y" block and set x to –210, y to –60.
      3. Add the "switch costume to" block and select "lion-a."
      4. Add the "wait () seconds" block with 1 second.
      5. Add the "move () steps" block and set it to 200 steps.
      6. Add the "switch costume to" block and select "lion-b."
      7. Repeat the sequence for the remaining steps.
  • Algorithm O (Zebra):
    StepInstruction
    1Start program when any key is pressed
    2Set Zebra’s position to x = –200, y = 10
    3Switch costume to zebra-b
    4Wait 1 second
    5Move 125 steps
    6Switch costume to zebra-a
    7Wait 1 second
    8Move 125 steps
    9Switch costume to zebra-b
    10Wait 1 second
    11Move 150 steps
    12Switch costume to zebra-a
    • Steps to create the program in Scratch for Zebra:
      1. Add the "when () key pressed" block and set it to "any."
      2. Add the "go to x, y" block and set x to –200, y to 10.
      3. Add the "switch costume to" block and select "zebra-b."
      4. Add the "wait () seconds" block with 1 second.
      5. Add the "move () steps" block and set it to 125 steps.
      6. Add the "switch costume to" block and select "zebra-a."
      7. Repeat the sequence for the remaining steps.
  • Steps to create the full program in Scratch:
    1. Create a new Scratch project and delete Sprite 1.
    2. Select the Woods backdrop.
    3. Add the Rabbit sprite and implement Algorithm M’s code.
    4. Add the Lion sprite and implement Algorithm N’s code.
    5. Add the Zebra sprite and implement Algorithm O’s code.
    6. Run the program by pressing any key.
  • Program execution:
    • When any key is pressed, all three algorithms (M, N, O) run simultaneously.
    • Each animal moves to its starting position, then progresses through the race by moving forward in steps, switching costumes to simulate running.
    • The efficiency and total distance moved determine the race outcome.

Coding the program for a Dance Battle

  • This section involves creating a Scratch program for a dance battle with two sprites performing a synchronized dance routine.
  • Key requirements:
    • Choose two sprites and a suitable backdrop.
    • Each sprite’s code must set its starting position and execute a dance routine.
    • The two sprites must start and finish their routines together.
    • Include a static object, such as a speaker, in the scene.
  • Scratch blocks used:
    • Sound group: Blocks to play sounds, enhancing the dance routine.
    • Looks group: Blocks to switch costumes, simulating dance movements.
    • Motion group: Blocks to set positions and move sprites.
    • Events group: Blocks to trigger the program (e.g., when a key is pressed).
    • Control group: Blocks to manage timing (e.g., wait blocks).
  • Steps to create the program in Scratch:
    1. Create a new Scratch project and delete Sprite 1.
    2. Select a backdrop suitable for a dance battle.
    3. Add two different sprites for the dancers.
    4. For each sprite, add code to:
      • Set the sprite’s starting position using the "go to x, y" block.
      • Create a dance routine using a combination of "switch costume," "move," "wait," and "play sound" blocks.
    5. Add a static object (e.g., a speaker sprite) and set its position.
    6. Ensure both sprites’ routines are synchronized to start and end together.
    7. Run the program and save the project.

Did you know?

  • Most computer-controlled devices can perform multiple tasks simultaneously, similar to running multiple algorithms.
  • Examples:
    • Robot vacuum cleaners: Move and clean at the same time, combining navigation and suction tasks.
    • Washing machines: Spin the drum and add water simultaneously, coordinating mechanical and fluid control tasks.

What can you do?

  • Understand the concept of efficient algorithms and strive to create concise solutions.
  • Identify repeated steps in tasks to optimize algorithms.
  • Create Scratch programs that run multiple algorithms concurrently to control different sprites.
  • Develop programs that reset objects to their initial positions or states, ensuring reusability.
The document Be a Designer Chapter Notes | Year 3 Computing IGCSE (Cambridge) - Class 3 is a part of the Class 3 Course Year 3 Computing IGCSE (Cambridge).
All you need of Class 3 at this link: Class 3
12 docs|12 tests

FAQs on Be a Designer Chapter Notes - Year 3 Computing IGCSE (Cambridge) - Class 3

1. What are the benefits of jump rope exercises?
Ans. Jump rope exercises are excellent for cardiovascular fitness, improving coordination, and enhancing agility. They also help in burning calories, building muscle tone, and increasing overall endurance.
2. How can I start learning jump rope techniques?
Ans. To start learning jump rope techniques, begin with a basic jump, focusing on timing and rhythm. You can gradually incorporate different styles such as the alternate foot step, the criss-cross, and double unders as you become more comfortable.
3. What are some common mistakes to avoid when jumping rope?
Ans. Common mistakes include jumping too high, which can lead to fatigue, poor form, such as bending the arms too much, and not using the wrists to turn the rope. Practicing proper technique will help improve efficiency and reduce the risk of injury.
4. How often should I practice jump rope to see results?
Ans. Practicing jump rope for about 15-30 minutes, 3-5 times a week can yield noticeable results in fitness and coordination. Consistency is key, so find a routine that fits into your schedule.
5. Can jump rope workouts be effective for weight loss?
Ans. Yes, jump rope workouts can be very effective for weight loss. They are high-intensity exercises that can burn a significant amount of calories in a short time, especially when combined with a balanced diet and overall fitness regimen.
Related Searches

Extra Questions

,

mock tests for examination

,

Exam

,

Be a Designer Chapter Notes | Year 3 Computing IGCSE (Cambridge) - Class 3

,

video lectures

,

study material

,

Be a Designer Chapter Notes | Year 3 Computing IGCSE (Cambridge) - Class 3

,

pdf

,

Viva Questions

,

shortcuts and tricks

,

Semester Notes

,

MCQs

,

Previous Year Questions with Solutions

,

Objective type Questions

,

past year papers

,

ppt

,

Summary

,

Free

,

Be a Designer Chapter Notes | Year 3 Computing IGCSE (Cambridge) - Class 3

,

Important questions

,

practice quizzes

,

Sample Paper

;