Python - introduction

Oliver Irwin

27th February 2023

Objectives of the course

  • describe what a programing language / Python is
  • implement simple scripts in Python
  • extend scripts with additional information

Languages

a language is a way to represent ideas such that two people can understand each other

they use:

  • an alphabet
  • a vocabulary
  • grammar rules

Programming languages

a programming language is a way to represent algorithms such that people and machines can understand each other

they use:

  • an alphabet
  • a vocabulary
  • grammar rules

Programming languages

just as different languages serve different purposes in different parts of the globe, there exists multiple programming languages that are used for different purposes

no spoken language is better than another, and no programming language is better than another: they all have their strengths and weaknesses

Understanding the language

in a similar way to interpreters and translators in the real world, programming languages need to be understood by both the machine and the user

some languages use an interpretor and some need to be compiled

Python

Created in the 90’s by Guido van Rossum

multi-paradigm1, multi-platform1

it’s an interpreted and open-source language1

1 we’ll talk about this later

Python

  • easy to learn
  • used in 3D software
  • easy to play with

Visual Studio Code

Your first script

The first step when learning a new programming language is usually to write a Hello World program.

print("Hello World!")

Your second script

Update the source code you wrote so that it prints

My name is {first_name} {last_name}

like this: My name is Oliver Irwin

Save the script in a file called presentation.py

Send the file to my email: o.irwin@rubika-edu.com