How to Print Words in Coding: A Beginner's Guide
By Know.it editorial teamPublished Updated 7 min readEnglish
Voice + animated visuals, free — no sign-in needed.
Quick answer
To print words in coding, you write a print instruction and put your text inside brackets with quotes around it, like print("Hello"). The computer reads that line and shows the text on your screen. Quotes tell the computer it's text, not a variable name.
In one linePrint is a coding instruction that displays text, numbers or other values on the screen instead of on paper.
Picture yourself as an explorer holding a blank map. You want to fill it with whole new worlds. In coding, the print command is that first stroke of your pen — it's how you make something appear out of nothing.
Most beginners think print means the printer on the desk. It doesn't. It simply shows text on your screen. Let's see how this tiny instruction becomes your voice inside the computer.
What does print actually do in coding?
Print is the computer's way of showing you something. You give it a message, and it puts that message on the screen. That's it. No paper, no ink, no printer noises.
Think of it like sending a WhatsApp message to yourself. You type words, you hit send, and the words appear. Print works the same way — you write the instruction, you run the program, and your words show up.
This is why print is almost always the first thing anyone learns. Before you can build a game or an app, you need to see what your code is doing. Print gives you that view.
- Print shows text on the screen, not on paper.
- It's usually the very first command beginners learn.
- It helps you check what your program is doing.
How does print work step by step?
Let's slow it down and watch the whole thing happen. It's simpler than it looks.
First, you write the instruction: print("Hello"). The word print tells the computer what kind of action to take. The brackets hold what you want to show. The quotes mark the text.
Second, the computer reads your line from left to right. It recognises print, looks inside the brackets, and picks up the text. Third, it displays Hello on your screen. Three small steps, one visible result.
See? Simple! The brackets are like an envelope. Whatever you put inside gets delivered to the screen.
Try your first program
Open any code editor — even a free online one works. Type print("Your name") and press run. Your name appears on the screen. That's a complete program. You just talked to a computer and it listened.
Why do quotes matter so much?
This is where most beginners trip up, so let's be careful here.
When you write print("Hello"), the quotes tell the computer: this is text, show it exactly as written. But when you write print(Hello) with no quotes, the computer thinks Hello is the name of a variable — a storage box — and it goes looking for that box.
If no such box exists, you get an error. The computer isn't being difficult. It's just following the rule you gave it.
So remember: words need quotes. Always.
- print("Hello") shows the word Hello.
- print(Hello) makes the computer search for a variable called Hello.
- Missing quotes are the number one beginner error.
Single quotes or double quotes?
Another common slip is mixing quote styles. You might write print('Hello") with a single quote on one side and a double on the other. The computer sees an unfinished text and throws an error.
The fix is easy: pick one style and stick to it. Double quotes are the safest choice for beginners because they're easy to spot and rarely clash with anything else.
If you ever get a syntax error on a print line, check your quotes first. Nine times out of ten, that's the culprit.
Can you print numbers without quotes?
Yes, and this is where things get fun. Numbers don't need quotes at all. Write print(42) and the number 42 appears on your screen.
Why the difference? Because the computer already knows what a number is. Numbers are values on their own. Words, on the other hand, need quotes to be recognised as text rather than names.
Try print(7), print(100), print(3.14). Each one shows up cleanly. Now try print("42") — that also works, but the computer treats it as text, not as a number you can do maths with.
A quick practice drill
Here's a routine that builds real confidence. First, print your name. Then print a number. Then print a full sentence like print("I am learning to code"). If something breaks, check your quotes and brackets before anything else. That habit alone will save you hours.
What are the most common print mistakes?
Beginners hit the same few walls again and again. Knowing them in advance saves a lot of head-scratching.
The first is missing quotes around text. The second is mismatched quotes — one single, one double. The third is a missing closing bracket, which leaves the instruction hanging.
The fourth is using a capital P, like Print("Hello"). Most languages are case-sensitive, so print and Print are not the same thing.
When you see an error, don't panic. Read the message, then check those four things in order. You'll fix it fast.
- Missing quotes around words.
- Mismatched single and double quotes.
- A missing closing bracket.
- Wrong capitalisation, like Print instead of print.
How do you get better at printing?
Practice beats reading every time. Set yourself a tiny daily drill: print your name, print a number, print a sentence. Three lines, two minutes.
Then push a little further. Print a sentence with a number inside it, like print("I have 5 rupees"). Print two lines one after another and watch them stack up on screen.
Every time something breaks, you learn a rule. That's not failure — that's the actual learning happening. Soon print becomes second nature, and you'll be ready to build bigger things.
Where print takes you next
Print is your first tool, but it stays useful forever. Even experienced coders use it to check what a program is doing in the middle of a run. Get comfortable with it now, and every later step feels lighter.
Key takeaways
- Print shows text on your screen — it doesn't use a printer at all.
- Words need quotes: print("Hello") works, print(Hello) usually errors.
- Numbers can be printed without quotes, like print(42).
- Pick one quote style and stick to it; double quotes are safest.
- Most print errors come from quotes, brackets or capitalisation.
Key terms
- A coding instruction that displays text or values on the screen.
- String
- Text in code, written inside quotes, like "Hello".
- Variable
- A named storage box in code that holds a value.
- Syntax error
- A mistake in how the code is written, such as a missing quote or bracket.
- Case-sensitive
- A language where capital and small letters are treated as different.
- Code editor
- The software where you type and run your code.
Practice questions
Which line correctly prints the word Hello?
- (a) print(Hello)
- (b) print("Hello")
- (c) Print("Hello")
- (d) print "Hello"
Answer key
(b) print("Hello") — Text needs quotes, and the command must be lowercase print.
What does print(42) display?
- (a) An error
- (b) The word forty-two
- (c) The number 42
- (d) Nothing at all
Answer key
(c) The number 42 — Numbers don't need quotes, so 42 appears directly.
Why does print(Hello) usually fail?
- (a) Hello is too long
- (b) The computer looks for a variable named Hello
- (c) Brackets are not allowed
- (d) Numbers are required
Answer key
(b) The computer looks for a variable named Hello — Without quotes, Hello is read as a variable name, not text.
Which mistake causes a syntax error?
- (a) Using double quotes
- (b) Using lowercase print
- (c) Mixing single and double quotes
- (d) Printing a number
Answer key
(c) Mixing single and double quotes — Mismatched quotes leave the text unfinished, so the computer errors.
Frequently asked questions
Does print actually print on paper?
No. In coding, print only shows text on your screen. It's a display instruction, not a printer command. If you want a physical copy, you'd need to save the output and print that file separately.
Why does print(Hello) give an error?
Without quotes, the computer treats Hello as the name of a variable and searches for it. If no such variable exists, you get an error. Adding quotes tells the computer it's plain text, so print("Hello") works.
Can I print numbers without quotes?
Yes. print(42) shows the number 42 directly, because the computer recognises numbers as values. If you write print("42"), it still appears, but the computer treats it as text rather than a number you can calculate with.
Why does Print with a capital P not work?
Most programming languages are case-sensitive, so print and Print are treated as different words. The command is lowercase print. If you capitalise it, the computer doesn't recognise the instruction.
What should I check first when print fails?
Check your quotes and brackets first. Make sure both quotes match, that the text sits inside them, and that every opening bracket has a closing one. That fixes most beginner errors straight away.
Quick recap: Print is the instruction that shows text on your screen — your first way of talking to a computer. Words go inside quotes, numbers don't need them, and most errors come from quotes, brackets or capitalisation. Practise a small drill daily and print becomes second nature.
Sources and further reading
- Watch the animated lesson: How to Print Words in Coding: A Beginner's Guide (Know.it)
- Python print function (Wikipedia) — en.wikipedia.org
- Intro to programming (Khan Academy) — khanacademy.org
Know.it editorial team
Written by the Know.it editorial team from the script of an animated Know.it lesson, checked against the lesson's own facts and the sources listed below. Know.it turns any question into a short visual lesson with voice and animation.
Reviewed: 11 November 2026 · Editorial standards · AI transparency

