Hello world

In this unit you will learn how to use Python to implement the first ever program that every programmer starts with.

Introduction

Here is the traditional first programming exercise, called "Hello world". The task is to print the message: "Hello, world".

Here are a few examples to get you started. Run the following cells and see how you can print a message. To run a cell, click with mouse inside a cell, then press Ctrl+Enter to execute it. If you want to execute a few cells sequentially, then press Shift+Enter instead, and the focus will be automatically moved to the next cell as soon as one cell finishes execution.


In [1]:
print("hello")


hello

In [5]:
print("bye bye")


bye bye

In [3]:
print("hey", "you")


hey you

In [4]:
print("one")
print("two")


one
two

Exercise

Now it is your turn. Please create a program in the next cell that would print a message "Hello, world":


In [ ]:
def hello(x):
  print("Hello, " + x)

When you think your solution is ready, press the checkbox-shaped button in the notebook toolbar above to send your program for a check.