The multiple choice questions are based on material from the Analyzing Patient Data lesson (the first Python lesson)
Formative assessment
a=5
print a,"a",5*a,"5*a",5*"a"
What will be the output of the Python program shown above?
- 5 a 25 5*a aaaaa
- 5 five 55555 twentyfive fivefivefivefivefive
- a,”a”,5a,”5a”,5*“a”
- a “a” 5a “5a” 5*“a”
- 5 5 25 25 25
- a a aaaaa aaaaa aaaaa
Summative assessment
a=3
b=5
a=b
b=a
print a,b
What will be the output of the Python program shown above?
- 5 5
- 3 5
- 3 3
- program will stop at statement a=b and produce en error
Comments for answers to the second question:
- correct answer
- student may be confusing a=b with a==b
- student understands variables a and b will be the same after the program ends, but confuses the order of assignment, possibly because b=a is after a=b (so it takes precedence)
- student takes the mathematical view that a=b is incorrect so program will give an error, does not understand that a=b is an assignment operation