Exercise 1: Say hello
Welcome to your first Python programming exercise! Let's start with the classic "Hello, World" program.
In Python, we use the print() function to display text on the screen. Here's how you can print "Hello, World!":
Let's break this down:
printis the function that tells Python to display something.- The parentheses
()contain what we want to print. - The text we want to print is enclosed in single quotes
''.
Now it's your turn! Try printing the following statement:
Type your code in the editor below, then hit the Run button to see if it works!
# Write your code here to print 'hello, world'
Write your code here
Make it print hello, world
Did it work?
Your program should print this:
hello, world