Youcanbuildtech / LearnProgramming Basics with Python
0 of 2 available lessons completeProgress saved in this browser
Lesson 2 of 12

Writing Your First Python Program

Understand how to write, run, and modify simple Python instructions using print().

Watch Writing Your First Python Program

Write a Python instruction in the editor and run it to see the output. print() can display text, numbers, and calculation results. Quotation marks make 10 + 5 text; without them, Python calculates 15. Parentheses and quotation marks matter, and instructions run from top to bottom.

Continue to Quiz
Check your understanding

Quiz

Answer each question correctly. You can try again as often as you like.

Question 1 of 4What appears in the output when you run this instruction?
print("Hello!")
Question 2 of 4What will these two instructions display?
print(10 + 5)
print("10 + 5")
Question 3 of 4This instruction causes an error. What change fixes it?
print("Hello!"
Question 4 of 4What will this program display?
print("Coins left:", 100 - 35)
print("Done")
Try it in Python

Practice

Print the word Hello, then print the word Python on separate lines.

Show hint

Use print('Hello') and another print() call.

Output

Run your code to see its output.

Python runs in your browser. Avoid entering private information. Browser workers are not a strong security boundary.