Starting from:

$29.99

"Introduction to Computer Science I" Specification for Assignment 03

COMP 1405 A/B/C − "Introduction to Computer Science I"
Specification for Assignment 03
For this assignment you will demonstrate that you can design, implement, and test expressions that
use logical operators. You will do so by determining the expressions that correspond to a pair of simple
circuit schematics that were assigned specifically to your
student number, and then developing a program that
takes command-line arguments and uses them to create
the Boolean inputs needed to evaluate your expression.
In order to complete this task, you will need to:
• find your assigned circuit schematics on Brightspace1
• know how to interpret the symbols on a circuit schematic2
• learn how to translate command-line characters into Boolean inputs for a circuit3
• evaluate your circuit (by hand) for several inputs (to design test cases for yourself)
Your submission for this assignment:
• must be a source code file with filename4 'comp1405_f21_#########_assignment_03.py'
• must NOT import anything other that 'sys' (which is required for command-line arguments)
• must create Boolean variables indicating if the command-line arguments hold zeros or ones5
• must create logical expressions that correspond precisely to each of the assigned circuits
• must NOT attempt to "simplify" the schematics (e.g., do not simplify "x and x" into simply "x")
• must print out both comma-separated results inside "triangle brackets" (e.g., <True, False>)
• can assume that the user will always enter 12 command-line arguments to be used as inputs6
1 The "Tasks for Assignment 3.pdf" document on Brightspace contains each student's assigned circuit schematics.
2 This was discussed during the second live lecture session (i.e., Wednesday/Thursday) that took place during Week 03.
3 sys.argv[1] will correspond to circuit input 'A', sys.argv[2] will correspond to circuit input 'B', etc.
4 You must replace the number signs in the filename with your official nine-digit student identification number.
5 The expression sys.argv[1] == '1' will result in True if the 'A' input is a '1', and False if the 'A' input is a '0'
6
e.g., python3 source.py 0 0 1 1 1 1 1 1 1 1 1 1 indicates the 'A' and 'B' inputs are False and the rest are True

More products