/hw-1

Exercise 1.0 – Hello, world!

Exercise 1.0 – Hello, world!

Recall that a program is just a set of instructions for the computer to execute. Let’s start with a basic command: print x: Prints the value of the expression x, followed by a new line. Create a new Python program called hello_world.py. You will use this file to write your very first 'Hello, world!' program.

How to create a program file:

Open visual studio code and create a new file named hello_world.py

Printing

print('Hello, world!')

Variables

Variables are containers for storing information. For example: Program Text:

x = 'Hello, world!'
print(x)

Execute hello_world.py

> python hello_world.py

The output should be:

Hello, world!