Pythonlearn:resources-week10
Lecture Notes Tuples Tuples are a sequence that behave much like a list, except: Tuples are immutable (cannot be altered) displayed surrounded by parentheses ‘(,)’ rather than brackets ‘[,]’ surrounding by parenthesis is just…
Pythonlearn:resources-week09
Lecture Notes Examples below come from Chapter 9 Video List – a linear collection of ordered values. Dictionary – an assortment of unordered labeled values, similar to a database Dictionaries Different names for Dictionaries: Associative…
Pythonlearn:resources-week08
Lecture Notes Lists Collection – allows us to put many values in a single variable. Simple variables are not collections. The previous value is overwritten when changed. A List is made up of list ‘constants’. Lists are surrounded by…
Pythonlearn:resources-week07
Lecture Notes Working with files Before Python can access file information it must “open” the file. open() is the built-in function which tells Python to open the file. open() takes two parameters ‘filename’ and…
Pythonlearn:resources-week06
Lecture Notes: Strings A string is a series of alphanumeric characters in a character data type. A string is defined by grouping series of character with single or double quotes. A plus sign (+) is used to concatenate multiple character strings. A…
Pythonlearn:resources-week05
Lecture Notes “is” and “is not” Operators “is” can be used in logical expressions. It implies ‘is exactly the same instance, type and value’. Whereas ‘==’ compares two items and will declare the…
Pythonlearn:resources-week04
Lecture Notes – Functions Programmers tend to write a lot of code, sometimes writing intricately nested conditionals and plugging in variables into complex formulas just to calculate one value or derive one output. However, repeating those several…
Pythonlearn:resources-week03
Lecture Notes – Conditional Execution Visualize python great tool for beginners Stanley Canning a few seconds ago I would really recommend students to use the visualizer that can be found at http://www.pythontutor.com/visualize.html#mode=edit It…
Pythonlearn:resources-week02
Some nice quotes from our professor Charles Severance: “Spam is good. Eggs is spam… Is good.” Constants Are Fixed values such as numbers, letters and strings. String constants use single or double quotes. Note: A “string” is…
Pythonlearn:resources-week01
Chapter 1 Exercises Exercise 1.1: C) Store information for the long term–even beyond a power cycle. Exercise 1.2: A sequence of Python statements that have been crafted to do something. Exercise 1.3: An interpreter reads the source code and…