(1) Multiple choice with reasons, (2) predict output of script,
(3) correct
errors in Python scripts, (4) convert traditional test script to unit test script,
(5) extract method from a script.
Definitions:
Datatypes (str, int, float, bool), base
prefixes (0x, 0b), string escape characters (
\n, \t, \a, \ \ , \", \', \s), operators (+, -, *, /,
%, ==, <, >, <=, <=, !=, and, or), bitwise operators (&, |),
comment ( # ), data
representations (binary, hex, packed decimal, binary ASCII), F-strings, format
specifiers for use in the str format method (d, x, X,
b, s, field width, digits after decimal), input/output (print,
input, open), TextIOWrapper methods (close, readline, write),
control structures (if..elif, while, for), string
delimiters ('..', "..", '''..''',
""".."""),
lists, list index, class, object, class variable, instance variable, dunder methods (__init__,
__str__, __repr__), instance method, standalone method, accessibility (public, private),
testing (traditional, unit testing class with self.assertEqual),
UML diagram.
Answer multiple choice questions Give an optional reason or show your work
for partial credit.
Construct a variable trace and predict the output for a Python script.
Find errors in a Python script.
Put the lines of a Python script in the correct order for a script that has its lines shuffled.
Given a Python script, extract a standalone method and write traditional and unit test
scripts (test1.py and test2.py) to test the method.
Given a traditional test script for a class, convert it to a unit test script.
Convert an int value among these representations: decimal, binary, hex. The maximum value will be 127 decimal
(0x7f hex, 0b01111111 binary).
Perform bitwise operations bitwise and ( & ), bitwise or (
|
), and bitwise exclusive or ( ^ ).
Interpret a hex dump, similar to Problem 5 of Project 1, that contains data expressed in one of these formats:
ASCII string, packed decimal, hex integer, bit map.