انتقل للمحتوى
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

print: write on the screen

Section 1: The startLesson 1.2 · ⏱ 6 min

The print command writes what is between the brackets on the screen. Words go between quotation marks " ".

print("Hello, Robo Egypt!")
print("I love Python")
print(3 + 4)
🖥️ The output in Robo Python:
Hello, Robo Egypt!
I love Python
7
🐍 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
📌 Note
print(3 + 4) without quotes calculates and writes 7, but print("3 + 4") writes the words as they are.

📌 Another example: print with more than one thing

Put a comma (,) between the things: print writes them on one line with a space between them.

🐍 print with more than one thing
print("Robo", "Egypt", 2026)
print("2 + 3 =", 2 + 3)
print("-" * 20)
🖥️ The output in Robo Python:
Robo Egypt 2026
2 + 3 = 5
--------------------
🐍 Open the code in Robo Python ↗
✍️ Practise
Try the lesson's examples here: copy the code, change it, and click ▶ Run.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

Print: I am 10 years old, with the number worked out from 5 + 5.

👀 Show the solution
🐍 Solution
print("I am", 5 + 5, "years old")
🖥️ The output in Robo Python:
I am 10 years old
🐍 Open the code in Robo Python ↗

Result: I am 10 years old

Medium

Print a line of 30 stars using multiplication.

👀 Show the solution
🐍 Solution
print("*" * 30)
🖥️ The output in Robo Python:
******************************
🐍 Open the code in Robo Python ↗

Result: 30 stars on one line.

Hard

Print a 4 × 4 square of the # sign.

👀 Show the solution
🐍 Solution
print("# # # #")
print("# # # #")
print("# # # #")
print("# # # #")
🖥️ The output in Robo Python:
# # # #
# # # #
# # # #
# # # #
🐍 Open the code in Robo Python ↗

Result: four lines of #.

Finished the lesson? Mark it so your progress counts.