Print

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

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

2/10

Print | Start Coder