Verified Documents at Queen's University

Browse the full collection of course materials, past exams, study guides and class notes for CISC 121 - Introduction to Computing Science I at Queen's University verified by our …
PROFESSORS
All Professors
All semesters
Wendy L Powley
winter
35

Verified Documents for Wendy L Powley

Class Notes

Taken by our most diligent verified note takers in class covering the entire semester.
CISC 121 Lecture 1: intro to python 3, IDEs, shells, blank lines, comments, data vs code, data types, numbers, text, booleans, literals, variables
A python 3 program is a file that only contains text that conforms to the syntax of the python 3 programming language. Via a text editor, which is dist
4182
CISC 121 Lecture Notes - Lecture 2: Equals Sign, Style Guide
Variables in python 3 must be named as follows. Name starts with a letter or underscore. The rest of the name may contain letters, numerals 0 through 9
384
CISC 121 Lecture Notes - Lecture 3: Associative Array, Bracket
To determine the number of elements in a list, use same len() function used with strings len([ a", 7, 8. 2, fred"]) == 4 # is true. Regarding the len()
395
CISC 121 Lecture Notes - Lecture 4: Standard Streams
That said, it"s probably more common for a program to need to determine whether or not a specific value is associated with a known key, as in. Removing
3103
CISC 121 Lecture Notes - Lecture 5: Empty String, Newline, English Alphabet
Arguments of type int, float, tuple, bool, and str cannot have their values changed by the workings of a function. Arguments of type list and dict, how
388
CISC 121 Lecture Notes - Lecture 6: Empty String
Programming languages should give the programmer a way to specify that an action should take place in certain circumstances, when specific conditions a
357
CISC 121 Lecture 7: Loops, range(), len(), functions, creating a function
It is known that len(my_nums) returns the number of elements in the list my_nums, which (see example from last lesson) is: when range() is applied to 5
370
CISC 121 Lecture 8: Functions, local variables, scope of variables, comments
Only the first encountered will be executed. return true def first_is_shorter(thing1, thing2): if len(thing1) < len(thing2): else: print (first_is_s
392
CISC 121 Lecture Notes - Lecture 9: Newline
Python functions can return 1+ value, in a sense. What the calling statement gets back is a tuple . Some of what we"ll cover in this course may involve
3194
CISC 121 Lecture 10: Program design, top-down design, stepwise refinement, functions as part of refinement, algorithms, program design versus programming language
Program design: topic worthy of an entire university degree. A natural (or human) language decomposition of a system into successively smaller parts do
353
CISC 121 Lecture 11: Reuse, modules as part of refinement, bottom-up design, top-down design, hybrids, example
Be aware that acquiring a list of functions through the design process may help you spot opportunities for code reuse. It"s possible that one or more f
346
CISC 121 Lecture 12: Benefits of top-down design, information hiding, compartmentalizing, subtasks, how functions work, locals(), call stack, popping the stack
Reducing a large problem to a set of much smaller problems makes a large project seem less daunting. (may have psychological benefit as well as a pract
557
CISC 121 Lecture Notes - Lecture 13: Fuzz Testing, Equivalence Partitioning
Program correctness: proving that implementations of algorithms meet the specifications set out for them. Program testing: often opted for instead of p
357
CISC 121 Lecture Notes - Lecture 14: Ieee Software
Most testing techniques fall into one of two large categories. The term came into being to differentiate it from black-box testing, but is also commonl
344
CISC 121 Lecture 15: Execution tracing, choosing how to do execution tracing, pausing execution, idle's debugging tools,
Execution tracing: tracking the course of a running program"s execution computers can execute code faster than we can think about it. Python 3 can init
359
CISC 121 Lecture Notes - Lecture 16: Flash Memory, Complex Instruction Set Computing, Surface Web
In-class coding lab thursday - we will be working in groups of two! Part 1: the importance of searching and linear searches. Much of what we do on a co
340
CISC 121 Lecture Notes - Lecture 17: Jigsaw Puzzle, Linear Search, Lincoln Near-Earth Asteroid Research
Sometimes too often the only way to find a certain item in a collection of items is to pick though them. Highly detailed puzzles often reduce this proc
440
CISC 121 Lecture Notes - Lecture 18: Linear Search, Lincoln Near-Earth Asteroid Research, Binary Search Algorithm
If a value that"s being looked for is the last item in the list, or is not in the list at all, every element in the list will be tested, once, against
354
CISC 121 Lecture Notes - Lecture 22: Binary Search Algorithm, Linear Search, Complex Instruction Set Computing
338
CISC 121 Lecture Notes - Lecture 23: Linear Search, Binary Search Algorithm, Pseudocode
From last lesson, we learned that a binary search accomplishes in 10 steps what a linear search would need 1000 steps to accomplish. With this establis
458
CISC 121 Lecture Notes - Lecture 24: Complex Instruction Set Computing, Pseudocode, Linear Search
347
CISC 121 Lecture Notes - Lecture 25: Supreme Headquarters Allied Powers Europe, Cocktail Shaker Sort
653
CISC 121 Lecture Notes - Lecture 26: Binary Search Algorithm, Linear Search, Binary Logarithm
If we were to attach mathematical formulas to the line and curve on that chart, we would get y = mx for the linear search, where m is the line"s slope.
334
CISC 121 Lecture Notes - Lecture 27: Cocktail Shaker Sort, Binary Logarithm, Binary Search Algorithm
332
CISC 121 Lecture Notes - Lecture 28: Asymptotic Analysis, Performance Metric, Big O Notation
229
CISC 121 Lecture Notes - Lecture 29: Big O Notation, Binary Search Algorithm, String Literal
351
CISC 121 Lecture Notes - Lecture 30: Insertion Sort, Bubble Sort, Selection Sort
We would still say this slight revision of the previous code snippet runs in. O(log n) time, even though it"s more precisely o(log3 n) time: n = len(so
338
CISC 121 Lecture Notes - Lecture 31: Insertion Sort, Bubble Sort, Binary Search Algorithm
370
CISC 121 Lecture Notes - Lecture 32: 5,6,7,8, Call Stack
334
CISC 121 Lecture Notes - Lecture 33: Functional Programming, Complex Instruction Set Computing, Big O Notation
The mechanics of mutual recursion are the same as for non-mutual recursion, except that the stack frames will alternate between those belonging to f1,
341
CISC 121 Lecture Notes - Lecture 34: Binary Search Algorithm, Merge Sort
This week we"ll look at a couple of sorting algorithms that employ recursion instead of nested-loop iteration to do their work. These sorts can be impl
336
CISC 121 Lecture Notes - Lecture 35: Merge Sort, Sorting Algorithm, Quicksort
336
CISC 121 Lecture Notes - Lecture 36: Quicksort
359
CISC 121 Lecture Notes - Lecture 37: Sorting Algorithm, Quicksort, Merge Sort
The partition function you"ve seen above can be improved with a better choice of pivot value than the first value in the list/sub-list. This code selec
338
CISC 121 Lecture Notes - Lecture 38: Linked List
Python 3 does not have an explicit pointer data type, but it makes use of them constantly, handling most operations on them automatically. C, by contra
362