Your first step into programming. No previous coding experience required.
What is Python?
Python is a programming language. We use it to give instructions to a computer.
Why do we need it?
A computer needs instructions to know what to do. Displaying a message is a simple way to see that it followed your instruction.
Your first instruction
print("Hello, World!")This tells Python to display a message.
Understand the code
print— displays something on the screen. Write it in lowercase.()— holds the information passed to print. Use an opening and a closing parenthesis."Hello, World!"— the text we want to display. The matching quotes mark its beginning and end.
Predict the output
What message will appear? Will the quotes appear too?
Run and observe
The Python editor below contains the example. Press Run, then look at OUTPUT. Does the result match your prediction? Change one value and predict again.
Later, an automation program can display a message for the person running it. For now, we will only display text; no servers are checked or changed.
Now it’s your turn
Try the everyday exercise first, then apply the same idea to the automation exercise. Work from the requirement, predict the result, and write your own code.
Loading practice replaces the current code. Copy any work you want to keep first. Open hints only when you need them; they do not open automatically.
Now it’s your turn
Write a Python instruction to display your own message. Choose any short message, such as a greeting. Before running it, say what you expect to see.
Hint 1: getting started
Look back at the first instruction. Which part contains the message?
Hint 2: next step
Keep print, the parentheses, and the pair of quotes. Replace only the text inside the quotes.
Expected result (compare after trying)
Your chosen message appears once, without the surrounding quotes.
A small automation message
Imagine a program that displays a message before someone starts work. Display the text Ready to begin. This only displays a message; it does not perform a check.
Hint 1: getting started
This uses the same single instruction as your greeting.
Hint 2: next step
Put the message between matching quotes inside the parentheses.
Expected result (compare after trying)
Ready to begin
If something goes wrong
- If you leave out a closing quote or parenthesis, Python cannot read the instruction. Compare it with the example, one character at a time.
- Use straight quotes like the example. Curly quotation marks copied from a document do not work as Python text delimiters.
- Use lowercase print. Print is a different name and will not display your message.
After fixing one thing, run the program again. A mistake is useful feedback while you learn.
Quick quiz
What you learned
You gave Python one instruction and saw it display a message. You can now change that message yourself. Next, we will practise print more and introduce comments, one small step at a time.
- Explain that Python lets you give instructions to a computer.
- Write one print instruction to display your own message.
- Predict the message and compare it with the output.
Practice reviews are your own confirmation, not automatic grading. Progress lasts for this page session.
Complete both practice reviews and pass this lesson’s quiz to mark it complete.
Your beginner learning path
- 01 · Hello, Python! 🐍
Explain that Python lets you give instructions to a computer.
- 02 · Understanding print() and comments
Explain the difference between a comment and output.
- 03 · Variables and storing information
Assign a value and use the variable in print.
- 04 · Strings, numbers, and booleans
Recognize str, int, float, and bool values.
- 05 · Basic operators and calculations
Use addition, subtraction, multiplication, and division.
- 06 · Getting input and displaying output
Use input to read text into a variable.
- 07 · Making decisions with if
Write an if/else block with correct indentation.
- 08 · Repeating instructions with loops
Predict the numbers produced by range.
- 09 · Lists and dictionaries
Create a list, access an index, append an item, and iterate.
- 10 · Functions and reusable code
Define and call a no-input function.
- 11 · Errors and debugging
Distinguish syntax, runtime, and logic mistakes.
- 12 · Your first mini-project
Break a reporting problem into input, processing, and output.
Previously completed topics remain complete. New lessons have their own practice and quiz. Optional modules and JSON material from the earlier edition remains available in the sidebar.
After fundamentals: modules, virtual environments, files, JSON, APIs, testing, and DevOps automation. Each future stage will build on what you can already write independently.