ุงู†ุชู‚ู„ ู„ู„ู…ุญุชูˆู‰
Robo EgyptRobo Egypt
โ˜ฐ Course contents
Robo Apps: home
0. Lab tour1
1. The start: your first app3
2. Variables2
3. Typing and maths2
4. Conditions3
5. Time2
6. Sound and speech2
7. Arranging the screen2
8. Lists2
9. Games3
10. Sensors2
11. Bluetooth with Robo Maker2
12. Your app on your phone1
13. The final project: catch the apple3

๐Ÿ› ๏ธ Project: tap fast

Section 5: TimeLesson 5.2 ยท โฑ 12 min
๐ŸŽฏ Project goal
You have 10 seconds: tap the button as fast as you can. When the time is up your score appears.
Two variables: score for the taps and time for the time. The timer takes the time down, and the button adds points as long as the time is more than 0
Two variables: score for the taps and time for the time. The timer takes the time down, and the button adds points as long as the time is more than 0
We tapped 15 times while the time ran
We tapped 15 times while the time ran
Time's up: 15 stayed
Time's up: 15 stayed
  • The condition time > 0 in the button stops taps after the time is up.
  • When the time becomes 0 the message โ€œYour score: 15โ€ appears and a note plays.
  1. Make the time 5 seconds.
  2. Change the button's colour to grey when the time is up.

๐Ÿ“Œ Another example: tap in 5 seconds

The same game with five seconds, and taps after the time is up don't count.

The design
The design
The blocks
The blocks
In the lab: time's up
In the lab: time's up
โœ๏ธ Practise
Make the example yourself: put the parts in โ€œ๐ŸŽจ Designโ€, then the blocks, and tap โ–ถ Run.
โœ๏ธ Practise here in the lessonor open the lab in a new page โ†—

๐ŸŽฏ Challenge yourself

Easy

Only three seconds.

๐Ÿ‘€ Show the solution
The design
The design
The blocks
The blocks
In the lab
In the lab

Result: the time was up after 3 seconds.

Medium

A message at the end with the number of taps (toast).

๐Ÿ‘€ Show the solution
The design
The design
The blocks
The blocks
In the lab
In the lab

Result: You tapped 6 times.

Hard

An โ€œAgainโ€ button that resets the time and the points.

๐Ÿ‘€ Show the solution
The design
The design
The blocks
The blocks
In the lab
In the lab

Result: back to 3 and 0.

Finished the lesson? Mark it so your progress counts.