Leaving Cert Notes

Notes and Anki Decks for the Leaving Cert

Python Programming

We write code in an IDE/IDLE (Integrated Development Environment)

Our IDE is Visual Studio Code (An (Open Source) Microsoft Product)

  1. Save all files with .py suffix This sets the programming language
  2. Type code (instructions) print(“text”) = to display the word text
  3. Save as helloworld.py
  4. Run the program in the terminal ᐅ (Check the left corner for correct python interpreter)

A string is a list of characters In our previous example, “text” was the string

If we want to split the string onto two lines, we use /n

\n = new line

Print("Hello World\nI love the weather")
Output:
Hello World
I love the weather

\t = new tab

Print("Hello World\tI love the weather")
Output:
Hello World    I love the weather

Names of Quotes

Symbols Names
”” (“) Double Quotes
’’ (‘) Single Quotes

Maths Operations

Name/Role Symbol
Add +
Subtract -
Multiple *
Integer Division //
Float Division /
To the Power of **