Introduction to Computer Science

ICS 3U is taught using the Python programming language. Students are strongly encouraged to download and install Python on their home computer or laptop. While Python is not simple to install on a Chromebook, there are online tutorials which can walk you through the process. Alternatively, there are several online compilers students can use instead; links are at the right.

Course content

All course content is delivered through PowerPoint presentations in class and handouts and assignments in our OneNote classroom. Files in our OneNote classroom can be accessed on any computer, smartphone, or tablet using the OneNote app which can is either included in Windows or can be downloaded for free from your app store or from onenote.com.

Course outline

Unit 1: Introduction

  • What are computers?
  • What is programming?
  • Can you give instructions?
  • Getting started with Python
  • Commenting
  • Field sizing
  • Variables
  • Getting input from the user
  • Program development process

Unit 2: Control Constructs

  • If structure
  • If/else structure
  • If/else if/else structure
  • Cascading if structures
  • Boolean expressions
  • Compound Boolean expressions
  • Loops
  • Error trapping
  • Counted loops
  • Nested structures
  • Tracing program execution

Unit 3: String Manipulation

  • Strings
  • Substrings
  • Length command
  • Index command
  • Other string commands

Unit 4: Functions

  • Functions

Unit 5: File I/O

  • Writing data to a file
  • Reading data from a file
  • Reading and writing at the same time

Unit 6: Lists

  • Creating a list
  • Searching and sorting lists
  • lists and file I/O

Final Project

Ministry Course description

This course introduces students to computer science. Students will design software independently and as part of a team, using industry-standard programming tools and applying the software development life-cycle model. They will also write and use subprograms within computer programs. Students will develop creative solutions for various types of problems as their understanding of the computing environment grows. They will also explore environmental and ergonomic issues, emerging research in computer science, and global career trends in computer-related fields.

Course requirements

Required materials: 3-ring binder, paper, pens, pencils, highlighter, access to a computer (Windows, Linux or Mac) to install Python (free)
Suggested materials: memory stick

Resources

  1. Go to python.org; hover over Downloads and select your operating system.
  2. Download the latest Python 3 release, which at last check was 3.11.4. Select the “executable installer” version for simplest installation; it will download an executable file which you can run to install Python on your computer.
  3. Once the download is complete, run the executable to install Python. Standard installation should suit most users.
  4. The program that we will be using is not Python itself, but the added program IDLE which is installed at the same time. IDLE is the Integrated Development Environment where we will do our coding.
  5. Once you open IDLE, the first thing you’ll probably want to do is go into the OptionsConfigure IDLEGeneral tab and change At Startup to Open Edit Window. That way as soon as you start IDLE you can start typing code.
  • This page is the starting page for finding information about Python.
  • The Python Standard Library describes the syntax and semantics of the Python language, which should be clearer to you as we progress through the course.
  • The Python Language Reference is a “to the point” explanation of some of the functionalities of Python.
  • The General Index is most detailed and sometimes the best fastest way to find information.

These will be referenced often as we go through the course. Links will be placed on this page for your reference.

  • This Python Tutorial is right on the python.org website.
  • W3Schools.com has some great tutorials with some interactive options so you can test code while you are learning.
  • W3Resource has a large Python tutorial as well.
  • Programiz has an extensive Python section on their website.
  • The HelloWorld Program site is more lighthearted, but educational nonetheless. There’s even a paper, rock, scissors game already there for you to copy and paste, ready to play!
  • RealPython has some great tutorials, some are video tutorials which you can watch parts of before you have to register on the site
  • A good explanation and demonstration of the for and while loops on learnpython.org
  • A good tutorial on the for structure on realpython.com; this link specifically points to the use of range, but the for loop in Python is much more versatile.
  • A huge list of string methods and functions at programiz.com with sample code you can run and edit
  • More examples and explanations at W3Schools.com, also with samples you can run
  • A good explanation on the Python.org website of strings, especially substrings (slicing)
  • This dummies page shows the different methods to search a string in Python, with a good explanation of the parameters for each
  • Three ways to reverse a string in Python
  • Tutorial on reading and writing files at RealPython.com
  • PythonForbeginners provides a detailed explanation of what happens when you open a file
  • StackAbuse shows some snippets of code about handling files, how to read files, how to write files, and how to append to files
  • A lot more in-depth than what is needed in this course, DataCamp.com has a very comprehensive explanation of the functionality of File I/O, including how you can use the os module to do other file functions

Check out this page on Finxter which lists over 100 Python books online, most of which are in PDF. Take a look at some of them and let me know if you find a favourite!

  • A Byte of Python is a free online book which is used by educational institutions around the world
  • Think Python 2e is a freely available Python book which you can view in PDF or HTML
  • CodingBat.com has some quizzes for some of the concepts we cover in the course

If you find any neat resources that you would like to share, please email them to Mr. Milardovic for inclusion on the website.