ุงู†ุชู‚ู„ ู„ู„ู…ุญุชูˆู‰
Robo EgyptRobo Egypt
โ˜ฐ Course contents
Robo Python: home
0. Lab tour1
1. The start5
2. Variables and input5
3. Conditions5
4. Loops5
5. Lists4
6. Functions4
7. Drawing with the turtle3
8. The project: the guess-the-number game3
9. Strings in depth1
10. Dictionaries (dict)3
11. Randomness and errors3
12. Classes and objects (class)2
13. Pro drawing and charts3
14. The final project: the quiz game2

๐Ÿ› ๏ธ Section project: a profile card

Section 1: The startLesson 1.4 ยท โฑ 8 min
๐ŸŽฏ Project goal
A program that prints a card about you on several lines, with a frame of stars.
print("*********************")
print("*  Name: Sara       *")
print("*  Age: 11          *")
print("*  I love: robots   *")
print("*********************")
๐Ÿ–ฅ๏ธ The output in Robo Python:
*********************
*  Name: Sara       *
*  Age: 11          *
*  I love: robots   *
*********************
๐Ÿ Open the code in Robo Python โ†—
The example in Robo Python: the code on the right and what appeared on the left
The example in Robo Python: the code on the right and what appeared on the left

๐Ÿ“Œ Another example: a card with a frame

A profile card with a frame of dashes.

๐Ÿ A card with a frame
print("=" * 24)
print("  Name:  Omar")
print("  Age:   11")
print("  Hobby: robots")
print("=" * 24)
๐Ÿ–ฅ๏ธ The output in Robo Python:
========================
  Name:  Omar
  Age:   11
  Hobby: robots
========================
๐Ÿ Open the code in Robo Python โ†—
โœ๏ธ Practise
Challenge: make your own card, and add a line about your dream.
โœ๏ธ Practise here in the lessonor open the lab in a new page โ†—

๐ŸŽฏ Challenge yourself

Easy

A card with three lines: your name, your city and your favourite colour.

๐Ÿ‘€ Show the solution
๐Ÿ Solution
print("Name: Sara")
print("City: Cairo")
print("Color: blue")
๐Ÿ–ฅ๏ธ The output in Robo Python:
Name: Sara
City: Cairo
Color: blue
๐Ÿ Open the code in Robo Python โ†—

Result: three lines.

Medium

Add a line that works out your age in 5 years.

๐Ÿ‘€ Show the solution
๐Ÿ Solution
print("Name: Sara")
print("Age in 5 years:", 9 + 5)
๐Ÿ–ฅ๏ธ The output in Robo Python:
Name: Sara
Age in 5 years: 14
๐Ÿ Open the code in Robo Python โ†—

Result: Age in 5 years: 14

Hard

A card inside a frame of stars on all four sides.

๐Ÿ‘€ Show the solution
๐Ÿ Solution
print("*" * 20)
print("*  Name: Sara     *")
print("*  City: Cairo    *")
print("*" * 20)
๐Ÿ–ฅ๏ธ The output in Robo Python:
********************
*  Name: Sara     *
*  City: Cairo    *
********************
๐Ÿ Open the code in Robo Python โ†—

Result: a frame of stars.

Finished the lesson? Mark it so your progress counts.