Introduction to Python

Beginner's guide to Python

Hello World!

Python is a very simple language with a relatively straight-forward syntax. This practical aims to introduce you to this, by getting you to write the most common first program for any programmer learning a new language:

print("Hello World")

The "Hello World!" program!

Here, you're simply outputting the string "Hello World!" to the console by using the print()function, and giving it the string as an argument between the brackets. That way the function knows what to output!

Strings are a sequence of characters defined between quotation marks, such as "banana" or 'apple'.

Remember theprint()function, it will certainly come useful later on!

Last updated