Printing Text on the Screen
Your challenge
Think about the last time you went to the cinema. After paying for your ticket, the cashier handed you a slip showing the movie name, time, seat number, and price. That slip wasn’t created by hand, a program generated it.
In this exercise, we’ll build a simple version of that system. No math, no storage, just printing the exact ticket text as it should look.
This is what the ticket will look like:

You’ve been assigned to design this cinema ticket! For now, the only tool you’ll use is Python’s print() function.
The big idea
The concept for today is the built-in function. These are commands Python already understands. You don’t need to create them, you just call them.
The one we’ll use is print(). Its job is to display text or numbers on the screen. You place what you want to show inside parentheses, and Python will print it for you.
Example:
1print("Hello World")
This will show:
1Hello World
That’s it, you’ve written your first Python code!
Look closely at our ticket. It’s nothing more than lines of text, written in a certain order. Without print(), none of that text would appear. In this first version of our cinema program, every single line will come from its own print() statement.
⭐ Quick facts
- print() is a built-in Python command.
- Everything you want to display goes inside parentheses.
- Text must be in quotes: "Hello!"
Try it out
Let’s print the first two lines of our ticket:
1 2print("=== CINEMA TICKET ===") print("Cashier Name: Maria")
When you run this, you’ll see:
1 2=== CINEMA TICKET === Cashier Name: Maria
To complete the full ticket, just keep adding more print() lines.
Using AI for help
If you’re working with an AI assistant, you can simply ask:
Prompt:
Write a Python program that prints this exact cinema ticket using only print() statements:
1 2 3 4 5 6 7 8=== CINEMA TICKET === Cashier Name: Maria Movie: The Great Adventure Showtime: 7:30 PM Seat: C12 Price: $12
The AI will give you a ready-to-run program.
Time to practice
Great job! You’ve now built your own working Python ticket printer. But let’s make sure you’ve got the idea by trying something new.
Task
Print the following ticket exactly as shown, using only print() statements:
1 2 3 4 5 6 7 8=== CINEMA TICKET === Cashier Name: John Movie: Space Journey Showtime: 9:00 PM Seat: B7 Price: $15
Solution
1 2 3 4 5 6 7 8print("=== CINEMA TICKET ===") print("Cashier Name: John") print() print("Movie: Space Journey") print("Showtime: 9:00 PM") print("Seat: B7") print() print("Price: $15")
Perfect! Your Python cinema app is now complete.
Frequently Asked Questions
You use the print() function in Python to display output on the screen, passing the value or expression you want to print inside the parentheses.
The print() function in Python is used to output data to the console or terminal, making it important for displaying information or debugging code.
To print a name in Python, you pass the name (in quotes) to the print() function, like print("Your Name").
print() displays output, while input() allows users to enter data. input() takes input from the user as a string, and print() is used to display the results or messages.
Still have questions?Contact our support team