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:
🐍 Open the code in Robo Python ↗Hello, Robo Egypt! I love Python 7

📌 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("Robo", "Egypt", 2026)
print("2 + 3 =", 2 + 3)
print("-" * 20)
🖥️ The output in Robo Python:
🐍 Open the code in Robo Python ↗Robo Egypt 2026 2 + 3 = 5 --------------------
✍️ Practise
Try the lesson's examples here: copy the code, change it, and click ▶ Run.
✍️ Practise here in the lesson✖ Close the labor 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🙈 Hide the solution
print("I am", 5 + 5, "years old")
🖥️ The output in Robo Python:
🐍 Open the code in Robo Python ↗I am 10 years old
Result: I am 10 years old
Medium
Print a line of 30 stars using multiplication.
👀 Show the solution🙈 Hide the 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🙈 Hide the solution
print("# # # #")
print("# # # #")
print("# # # #")
print("# # # #")
🖥️ The output in Robo Python:
🐍 Open the code in Robo Python ↗# # # # # # # # # # # # # # # #
Result: four lines of #.

