Midterm Information
The Midterm will be on Canvas; and it will be 60-70% multiple choice, like our homeworks, and will be available self-scheduled over the weekend.
Midterm Concepts
- int vs. float
- operators:
+
,-
,*
,**
,/
,//
,%
- semantic errors
- syntax errors
- runtime errors
- script vs. shell
- variable assignment
- comments
- reassignment
- functions
print
ing- parameters
- arguments
- local variables
- declaration order - functions
- reassignment order - variables
- functions that take functions as parameters
- "fruitful functions"
return
- function composition
if
/else
elif
(chained conditionals)and
/or
/not
- recursion
- base case
- recursive step
- RecursionError
input
function- basic
turtle
s random.randint
,random.choice(list)
while
loops- incrementing variables
isinstance
break
X in Y
for n in range(...)
for letter in string
for item in list
for key in dictionary
- indexing
- slicing
- list.append
len(list)
,len(string)
,len(dict)
- empty strings
for index,item in enumerate(list)
- aliasing for lists
dictionary[key]
insertdictionary[key]
lookup/crashdictionary.get(key, backup)