Ψ§Ω†ΨͺΩ‚Ω„ Ω„Ω„Ω…Ψ­ΨͺΩˆΩ‰
Robo EgyptRobo Egypt
☰ Course contents
Robo Junior: home
0. Lab tour1
1. The start: Robo walks5
2. Talking and looks6
3. Sound and repeating5
4. Messages and more than one character4
5. The project: a story from your imagination3
6. Turning, costumes and waiting5
7. Speed and bumping5
8. Drawing and writing on the stage3
9. The big project: an interactive story3

πŸ› οΈ Section project: the dog chases the cat

Section 7: Speed and bumpingLesson 7.4 · ⏱ 10 min
🎯 Project goal
The cat walks slowly, and the dog runs fast behind her. When he catches her πŸ’₯: he stops and says β€œGot you!”, and the cat says β€œYou got me!”.
πŸ“Œ Note
Add a character: tap βž• next to the characters and pick one. Tap a character to code it: every character has its own blocks.
🧩 The cat and the dog
🐱 CatBlocks of 🐱 Cat
  1. When 🚩 is tapped
  2. Speed: 🐒 slow
  3. Move right ➑️ 14
  4. When it bumps into a character πŸ’₯
  5. Say πŸ’¬ β€œYou got me!”
🐢 DogBlocks of 🐢 Dog
  1. When 🚩 is tapped
  2. Speed: πŸ‡ fast
  3. Move right ➑️ 1
  4. Start again forever ♾️
  5. When it bumps into a character πŸ’₯
  6. Stop my other programs βœ‹
  7. Say πŸ’¬ β€œGot you!”
  8. Hop 🦘
The dog caught the cat
The dog caught the cat
The dog stopped, and the cat keeps going
The dog stopped, and the cat keeps going

πŸ“Œ Another example: a chase upwards

The same chase, but the cat runs away upwards with the dog behind her.

🧩 A chase upwards
🐱 CatBlocks of 🐱 Cat
  1. When 🚩 is tapped
  2. Speed: 🐒 slow
  3. Move up ⬆️ 10
  4. When it bumps into a character πŸ’₯
  5. Say πŸ’¬ β€œYou got me! πŸ˜Ώβ€
🐢 DogBlocks of 🐢 Dog
  1. When 🚩 is tapped
  2. Speed: πŸ‡ fast
  3. Move up ⬆️ 1
  4. Start again forever ♾️
  5. When it bumps into a character πŸ’₯
  6. Stop my other programs βœ‹
  7. Say πŸ’¬ β€œGot you! πŸΆβ€
The chase
The chase
He caught her
He caught her
✍️ Practise
Make the cat faster so the dog never catches her. Who wins now?
✍️ Practise here in the lessonor open the lab in a new page β†—

🎯 Challenge yourself

Easy

When the dog catches the cat, he hops twice for joy.

πŸ‘€ Show the solution
🧩 Solution
🐱 CatBlocks of 🐱 Cat
  1. When 🚩 is tapped
  2. Speed: 🐒 slow
  3. Move right ➑️ 14
  4. When it bumps into a character πŸ’₯
  5. Say πŸ’¬ β€œYou got me!”
🐢 DogBlocks of 🐢 Dog
  1. When 🚩 is tapped
  2. Speed: πŸ‡ fast
  3. Move right ➑️ 1
  4. Start again forever ♾️
  5. When it bumps into a character πŸ’₯
  6. Stop my other programs βœ‹
  7. Say πŸ’¬ β€œGot you!”
  8. Hop 🦘
  9. Hop 🦘
The result on the stage
The result on the stage
Medium

Add a referee: the cat sends a message when she is caught, so Robo announces β€œThe dog won! πŸ†β€.

πŸ‘€ Show the solution
🧩 Solution
🐱 CatBlocks of 🐱 Cat
  1. When 🚩 is tapped
  2. Speed: 🐒 slow
  3. Move right ➑️ 14
  4. When it bumps into a character πŸ’₯
  5. Say πŸ’¬ β€œYou got me!”
  6. Send a pink message βœ‰οΈ
🐢 DogBlocks of 🐢 Dog
  1. When 🚩 is tapped
  2. Speed: πŸ‡ fast
  3. Move right ➑️ 1
  4. Start again forever ♾️
  5. When it bumps into a character πŸ’₯
  6. Stop my other programs βœ‹
  7. Say πŸ’¬ β€œGot you!”
πŸ€– RoboBlocks of πŸ€– Robo
  1. When a pink message arrives πŸ“©
  2. Say πŸ’¬ β€œThe dog won! πŸ†β€
  3. Hop 🦘
The referee announces
The referee announces
Hard

Make the cat fast πŸ‡ and the dog slow 🐒, so the cat arrives and says β€œI escaped! πŸ˜Έβ€ before he catches her.

πŸ‘€ Show the solution
🧩 Solution
🐱 CatBlocks of 🐱 Cat
  1. When 🚩 is tapped
  2. Speed: πŸ‡ fast
  3. Move right ➑️ 12
  4. Say πŸ’¬ β€œI escaped! πŸ˜Έβ€
🐢 DogBlocks of 🐢 Dog
  1. When 🚩 is tapped
  2. Speed: 🐒 slow
  3. Move right ➑️ 10
  4. When it bumps into a character πŸ’₯
  5. Stop my other programs βœ‹
  6. Say πŸ’¬ β€œGot you!”
The cat escaped
The cat escaped
Finished the lesson? Mark it so your progress counts.