Study Guides (380,000)
CA (150,000)
UTSG (10,000)
CSC (300)

CSC108H1 Final: Complete and Comprehensive 62 Page Final Exam Study Guide - Fall 2015Premium

Computer Science
Course Code
Jacqueline Smith
Study Guide

This preview shows pages 1-3. to view the full 62 pages of the document.
CSC108 – Introduction to
Computer Programming
Final Exam Study Guide
University of Toronto St. George – Fall 2015

Only pages 1-3 are available for preview. Some parts have been intentionally blurred.

Subscribers Only
CSC 108 - Lecture 1- Syllabus
Course covers:
basics of programming in Python
fundamental concepts of programming
solve human problems using Python
Useful studying tips from Prof:
1. Rubber duck technique-explain your program to a rubber duck verbally
(helps you figure out solutions to problems)
2. Familiarize yourself with the course site
Inverted/Flipped Classroom
Prepare-view lecture videos and finish the exercises (Due Sundays by 10 pm online)
Rehearse-apply concepts from videos (completed in lecture)
Perform-demonstrate understanding by completing exercise (Due Friday by 6pm online)
Use PCRS-Programming Course Resource System for Prepare and Perform
use UTORID and password to log in
Assignments due on Tuesdays before 10:00 pm
submitting partially finished work results in partial marks
Midterm tests are during lecture times
Labs for student use:
CDF:Computing Discipline Facility
24 hour access to rooms in Bahen Centre: BA2200, BA2210, BA2220, BA2240,
BA2270,BA3175, BA3185, BA3195 and BA3200
Getting Help
Piazza (online discussion forum) post questions and answer questions.
Don’t post code until after assignments are due
Email instructors and TAs with questions
Use the drop in centre or help centres
To do list for first week:
Read Syllabus
Bookmark course website
Check Blackboard (Portal) for announcements
Install Python 3 (NOT Python 2) and Wing IDE 101(application to write Python
Complete the week 2 prepare exercise on the PCRS (due Sunday September 20 by 10
CSC 108-Lecture 2-Types and Operations

Only pages 1-3 are available for preview. Some parts have been intentionally blurred.

Subscribers Only
different kinds of information in Python are called types
every value has a type, which determines behaviour of values
two kinds are called floats and integers
short for floating point number
the floating point refers to the decimal
one slash “ / “ is used for floating point division, which produces a float result
e.g 10/3 = 3.33333333335 ->a close but inexact answer
numbers with no decimal points
use two slashes “ // “ for integer division, which produces an integer result
e.g: typing 9//3 will produce an integer result of 3
the results are not rounded but truncated
e.g 7/4 = 1.75 but 7//4 = 1
How to write comments
Use a number sign “#” to write comments in Wing IDE 101
everything that follows will not be executed by the program
Modulo Division
use a percentage sign “ % “ for modulo division, which returns a remainder
e.g 10 % 3 = 1
15 % 4 = 3
8 % 2 =0
5 % 2 = 1
5 % 3 = 2
Order of Precedence (from highest to lowest) :
Exponentiation (**)
multiplication, integer, float, mod division ( * , / , // , %)
Work left to right
addition and subtraction ( + , - )
Use parentheses to override this, and to make equations clearer
Syntax Errors
typing 2 ** 2, 2 ** 2 both will produce the correct result
typing 2 * * 2 will produce a syntax error
Python assumes that anything directly following a * should be a value, unless it’s **
which means exponentiation
other syntax errors include:
3 + -> unfinished expressions
4 + 5 ) -> extra parenthese
5 / 0 -> divide by 0 error
You're Reading a Preview

Unlock to view full version

Subscribers Only