Computers and Programming

Before you start to code, you need to understand how computers work.

Computer Overview

  • A computer is made up of many parts, each with their own purpose. We will look at the main parts and what they do.

    Main parts of a computer:

    MotherBoard

    Hard Disk Drive (HDD)/ Solid State Drive (SSD)

    Random-access Memory (RAM)

    Central Processing Unit (CPU)

    Video / Graphics Card

    Power Supply
  • Parts of a computer

    Image, by Ramesh_kannan5005, licensed under CC BY-SA 4.0

  • Motherboard

    The motherboard is what everything on your computer connects to.

    It is a circuit board that lets other parts communicate and has ports facing the outside of the case for things like monitors, mice or keyboards to connect.

    A computer motherboard

    "XO-1 motherboard", by John A. Watlington, licensed under CC BY-SA 3.0

    Hard Disk Drive (HDD) / Solid State Drive (SSD)

    This is permanent memory storage where all your data is saved, even when your computer is off.

    Hard disk drives are slower but cheaper. Solid state drives are faster but more expensive.

    A hard disk drive and solid state drive

    "HDD and SDD", by Santeri Viinamäki, licensed under CC BY-SA 4.0

    Random-access Memory (RAM)

    Like the HDD or SSD, RAM stores data. However the RAM is only only temporary memory (known as volatile).

    When you open a program, its data is stored in the RAM. When you close the program or turn off your machine, the RAM is freed so that other programs can use it.

    More RAM means more programs you can run at once.

    Two RAM cards

    "Swissbit 2GB PC2-5300U-555 DDR2 RAM", by An-d, licensed under CC BY-SA 3.0

    Central Processing Unit (CPU)

    This is the brain of the computer. It does all the calculations needed to make computer programs work.

    Different CPUs have different speeds. The faster the CPU, the faster your computer will run programs.

    A computer CPU

    "Intel_CPU_Core_i7", by Eric Gaba, licensed under CC BY-SA 4.0

    Video / Graphics Card

    A dedicated unit for handling output of images to display. It has its own dedicated RAM for these functions.

    The better the video card, the better you will be able to process video editing, rendering graphics, and high-end gaming.

    A computer graphics card

    Video Card, in the public domain

    Power Supply

    We can't turn on our computer without power. The power supply unit powers all other parts of the computer.

    The power supply connects to either an internal battery or a plug for an outlet.

    A computer power supply

    Power Supply, by Danrok, licensed under CC BY-SA 3.0

Programming Languages



    What is a programming language?

    A programming language is a language designed to provide instructions to computers and create programs.

    Different languages are better suited or designed for creating different types of programs.

    Languages have different structures and syntaxes (how they are written).

    Various logos of programming languages

    "Top Programming Languages", by Daniel Iversen, licensed under CC BY 2.0

Integrated Development Environments (IDEs)



    Where do we write code?

    Programs are typically written in text editors or IDEs.

    It's best to use IDEs as they provide useful tools for writing code, such as auto-complete, syntax highlighting, etc.

    Image of an IDE with python code

    We will use python's Integrated DeveLopment Environment (IDLE), which comes as part of the python download.