Grade 11 Computer Science

Welcome to Grade 11 Computer Science

Python

In this course we will learn a variety of programming skills using Python. You can download it from their official website:

Python.org

PyCharm

When you install Python, it comes with a basic IDE called IDLE that you are welcome to use. Sometimes you want to do something really basic, and IDLE is the quickest to use. There are however more powerful IDE's available that will make programming easier as we begin to do more complicated things.

At school, we have access to an IDE called PyCharm. It has a free version called 'Community Edition' and can be downloaded from its official website:

https://www.jetbrains.com/pycharm/

Pygame

Pygame is a free and open sourced library for Python designed to make creating multimedia applications quick and easily. You can read the official documentation from PyGame's website:

Pygame.org

Python Cheat Sheet

https://gto76.github.io/python-cheatsheet/

Installing Python and PyGame Instructions

Download the latest version of Python from the official website. SEE BELOW BEFORE RUNNING THE INSTALLER!

Python.org

When you run the installer make sure to select "Add Python To Path":

After the install is complete open Windows PowerShell as Administrator (or Command Prompt as Administrator).

You can do this by:

  1. Right-clicking the Start Menu,

  2. Select Windows PowerShell (Admin)

  3. Once you are in the PowerShell, type: "pip install pygame" and then hit Enter.

Wait until the install of PyGame is complete.

Python Programming Style Guide

Here is the official guide for recommended programming style conventions in Python:

https://www.python.org/dev/peps/pep-0008/

Sections

Most sections have hints/tips and a FAQ section. These address many common problems that people encounter. Please read through the FAQ's before asking for help.

You must complete up to Part 12 at a minimum before you can begin on your final project.

IMPORTANT

Make sure you choose IDLE (Python 3.x.x)

If you use Python 2, many things will not work.

You may chose a topic from the list below or the menu:

    • Provides a basic introduction to programming in Python using PyCharm

    • Introduces output

    • Introduces basic arithmetic and variables

    • More basic programming constructs

    • Introduces 'if' statements, and a first look at functions

    • Use repetition to solve problems

    • Generate random numbers

    • Drag graphics using a game loop

    • Create a template file you will use going forward

    • Get some experience using loops to create various effects

    • Store multiple values of same type in a list to reduce the number of variables you will need to use

    • Use functions to help with more complicated animations

    • How to interact with your program using the keyboard and mouse

    • Further improve your programs my importing graphics and sound effects

    • How to detect collisions between shapes and graphics in your programs

    • Another way similar to lists to store data

    • Improve the ease that you can make complicated games using classes

    • Automates a lot of collision detection between multiple objects in your programs

    • How to read and write text files using Python

    • Links to some tutorials on how to use lists to help you with games that are grid based

Please find the course outline below: