This unit is your start in computer science. You will write real programs in Python 3, beginning with a single print statement and finishing with programs that read input, make decisions, repeat steps and check their own data.
You will learn to use variables and constants with the four basic data types (integers, floats, strings and Booleans), and you will see what is really inside the computer: how numbers are stored in binary and hexadecimal, and how text is stored with ASCII and Unicode. You will write arithmetic, string, comparison and Boolean expressions in the correct order of operations, plan programs with the input, process, output model, and use the three control structures: sequence, selection (if, elif, else) and repetition (while and for loops), including nested structures that count, total and find the highest and lowest values. All the way through, and especially in the last two lessons, you will practise professional code maintenance: reading error messages, fixing syntax, run-time and logic errors, tracing code, testing it with a full range of test cases, and writing clean, well-named, well-commented code.
No programming experience is needed. If you took Grade 9 math (MTH1W), you have already read and changed some short Python programs; this unit starts again from the beginning and goes much deeper. All you need is a computer, Chromebook or tablet with Python 3 (free from python.org, the Thonny editor, or a free online Python 3 editor). Every lesson has worked examples, programs whose output is shown, a hands-on activity, lots of practice with answers, and a short quiz. Type the code yourself rather than copying it: it is the best way to learn, and copied indentation from a web page can contain invisible characters that Python rejects.
The next unit, Arrays and Subprograms, builds on this one with lists (one-dimensional arrays), string tools, functions, and searching and sorting.
Curriculum: The Ontario Curriculum, Grades 10 to 12: Computer Studies (2008), Introduction to Computer Science, Grade 11, University Preparation (ICS3U), strand A. Programming Concepts and Skills: A1.1 to A1.4 (data types and expressions), A2.1 to A2.3 (control structures and simple algorithms) and A4.1 to A4.5 (code maintenance). Expectations A1.5, A1.6 and A3 (arrays and subprograms) are taught in the unit Arrays and Subprograms, which also continues A4.