Print 42

Created by Julien Palard

Write a single line of code displaying the number 42.

What you'll learn

In this exercise you'll learn to use a function by trying the print builtin function.

A function is a named thing that does something specific:

  • the print function displays what's given to it,
  • the len function measures the thing we give to it,

The syntax to make a function work is called a "function call", to make print display the string "Hello world" the syntax is:

print("Hello world")

Advice

You'll need a number and the print() builtin function.

I'm not asking to print the string "42", (composed of two chars), but the number 42.

There's no corrections yet, hit the `Submit` button to send your code to the correction bot.

Keyboard shortcuts:

  • Ctrl-Enter: Send your code to the correction bot.
  • Escape: Get back to the instructions tab.

See solutions