The first thing to learn is how to print information. Our program could execute all sorts of instructions and calculations, but without printing the results, we would never know if the program is working correctly.
We use the print
function for printing. For example:
print(4)
Will output 4
. Or:
print("Hello, world!")
Will output Hello, world!
. Note that when printing text, we need to enclose it in quotes. Numbers, on the other hand, are not enclosed in quotes.
Instructions
In the editor on the right, use the print
function to print your age. Then click the run button.
On the next line, use the print
command again to print your name.
Start programming for free
2/10