First Half: closed resources - Multiple Choice or Short Answer
Second Half: allowable resources are RSI Textbook, course web notes, Python Tutor, PyCharm, methods cheat sheet
Textbook Sections: Chapter 9, Sections 10 - 17 and Chapter 10, Sections 1 - 18
65 minutes
unary
if boolean_value:
.
.
binary
if boolean_value:
.
.
else:
.
.
chained
if boolean_value1:
.
.
elif boolean_value2:
.
.
elif boolean_value3:
.
.
else (optional)
.
.
for
loops (definite)
for item in a_list:
for i in range(len(a_list)):
while
loops (indefinite)
while boolean_object:
sentinel value
' '
or " "
string traversal
string functions, operators and methods:
+
- concatenation operator
*
- repetition operator
:
- slice operator
<
, ==
, <=
, >=
, !=
- comparison operators
in
and not in
operators
len()
function
strip()
method
split()
method
replace()
method
[ ]
list traversal
list functions, operators and methods:
len( )
function
+
- concatenation operator
*
- repetition operator
:
- slice operator
append()
insert()
pop()
reverse()
index()
count()
remove()
multiple choice and/or short answer:
basic mathematics binary operators and precedence
for
and while
loops
strings
lists
methods, functions and operators for strings
methods, functions and operators for lists
accumulator pattern
boolean expressions using comparison operators
precedence : mathematical operators, relational operators, logical operators
selection (if
, if
- else
, if
- elif
- else
)
code reading:
program flow of execution (main() and other functions)
accumulator pattern
variable values at certain locations in the code
function return values
code writing: (Textbook Active Code Window)
for
and while
loops
strings
lists
random module functions - random() and randrange()
accumulator pattern
boolean expressions using comparison operators
precedence : mathematical operators, relational operators, logical operators
selection (if
, if
- else
, if
- elif
- else
)
not included
L-Systems
Turtle graphics