CS 1114 Midterm 1 2019
CS 1114 Midterm 1 2019
Brooklyn, NY 11201
Name: __________________________________________________
boolean operators: and, or, not loops: while and for something
in range
all functions in modules random, turtle, coercion functions: int, str, float
and math
assignment operator (=) and augmented print, input
assignment
operators: +=, -= , *=, /=, //=, %=, **=
i) bball
ii) bbasketball
iii) basketball
iv) ball
v) basket
1
Name _________________________________________ Net ID: ___________________
Output:
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
alpha = True
beta = True
gamma = False
delta= False
Expression Result
2
Name _________________________________________ Net ID: ___________________
For the purposes of this problem, you may use the following definitions
● A “Cheddar” block has two 90 degree angles and all sides are the same length
● A “Feta” block has two 90 degree angles and two adjacent sides have different lengths
● A “Swiss” block has adjacent sides with different lengths and the sum of the two adjacent
angles is not 180 degrees but the block is not Feta.
● A “Gouda” block has adjacent sides with the same length and the sum of the angles is
180 degrees but the block is not Cheddar.
What is the length of side 1:10 What is the length of side 1:5
What is the first angle:90 What is the first angle:90
What is the length of side 2:10 What is the length of side 2:10
What is the second angle:90 What is the second angle:90
CHEDDAR FETA
What is the length of side 1:10 What is the length of side 1:10
What is the first angle:90 What is the first angle:50
What is the length of side 2:5 What is the length of side 2:10
What is the second angle:30 What is the second angle:130
SWISS GOUDA
What is the length of side 1:10 What is the length of side 1:10
What is the first angle:30 What is the first angle:120
What is the length of side 2:5 What is the length of side 2:10
What is the second angle:150 What is the second angle:120
Not sure Not sure
3
Name _________________________________________ Net ID: ___________________
Solution to Question 4:
4
Name _________________________________________ Net ID: ___________________
5
Name _________________________________________ Net ID: ___________________
B $2.25 (none)
6
Name _________________________________________ Net ID: ___________________
Solution to Question 5:
7
Name _________________________________________ Net ID: ___________________
8
Name _________________________________________ Net ID: ___________________
(SCRAP)