CMN 152V ALL QUESTIONS AND ANSWERS SURE
A+
✔✔code_blocks_output4 — try it*Enter into check() what numbers a user would see as
the output of this
print(6+3)
#print(10)
print(5+6)
9
10
11
9, 10
9, 11
10, 11
9, 10, 11 - ✔✔9, 11
✔✔code_blocks_output5 — try it*Enter into check() what numbers a user would see as
the output of this
print(6+3)
10
5+6
9
10
11
9, 10
9, 11
10, 11
9, 10, 11 - ✔✔9, 11
✔✔variable_names1 — try it*Enter into check() whether "anumber" is a valid variable
name.
,Valid
Invalid - ✔✔valid
✔✔variable_names2 — try it*Enter into check() whether "aNumber" is a valid variable
name.
Valid
Invalid - ✔✔valid
✔✔variable_names3 — try it*Enter into check() whether "a number" is a valid variable
name.
Valid
Invalid - ✔✔invalid
✔✔variable_names4 — try it*Enter into check() whether "a_number" is a valid variable
name.
Valid
Invalid - ✔✔valid
✔✔variable_names5 — try it*Enter into check() whether "_number" is a valid variable
name.
Valid
Invalid - ✔✔valid
✔✔variable_names6 — try it*Enter into check() whether "number1" is a valid variable
name.
Valid
Invalid - ✔✔valid
✔✔variable_names7 — try it*Enter into check() whether "number!" is a valid variable
name.
Valid
Invalid - ✔✔invalid
✔✔variable_names_cont1 — try it*Enter into check() what a user would see as the
output of this code.
local = 10
10
nothing
The code will produce an error. - ✔✔nothing
✔✔variable_names_cont2 — try it*Enter into check() what a user would see as the
output of this code.
global = 10
, -- jessica note - the 'global' is in green
10
nothing
The code will produce an error. - ✔✔the code will produce an error
✔✔variable_assignment1 — try it*Enter into check() what a user would see as the
output of this code.
one = 2
#two = 1
three = 3
print( one + two + three )
4
5
6
7
The code will produce an error. - ✔✔the code will produce an error
✔✔variable_assignment2 — try it*Enter into check() what a user would see as the
output of this code.
one = 2
two = 1
three = 3
print( one + two + three )
4
5
6
7
The code will produce an error. - ✔✔6
✔✔variable_assignment3 — try it*Enter into check() what a user would see as the
output of this code.
one = 1
two = 1
three = 3
print( one + two + three )
4
5
6
7
The code will produce an error. - ✔✔5
A+
✔✔code_blocks_output4 — try it*Enter into check() what numbers a user would see as
the output of this
print(6+3)
#print(10)
print(5+6)
9
10
11
9, 10
9, 11
10, 11
9, 10, 11 - ✔✔9, 11
✔✔code_blocks_output5 — try it*Enter into check() what numbers a user would see as
the output of this
print(6+3)
10
5+6
9
10
11
9, 10
9, 11
10, 11
9, 10, 11 - ✔✔9, 11
✔✔variable_names1 — try it*Enter into check() whether "anumber" is a valid variable
name.
,Valid
Invalid - ✔✔valid
✔✔variable_names2 — try it*Enter into check() whether "aNumber" is a valid variable
name.
Valid
Invalid - ✔✔valid
✔✔variable_names3 — try it*Enter into check() whether "a number" is a valid variable
name.
Valid
Invalid - ✔✔invalid
✔✔variable_names4 — try it*Enter into check() whether "a_number" is a valid variable
name.
Valid
Invalid - ✔✔valid
✔✔variable_names5 — try it*Enter into check() whether "_number" is a valid variable
name.
Valid
Invalid - ✔✔valid
✔✔variable_names6 — try it*Enter into check() whether "number1" is a valid variable
name.
Valid
Invalid - ✔✔valid
✔✔variable_names7 — try it*Enter into check() whether "number!" is a valid variable
name.
Valid
Invalid - ✔✔invalid
✔✔variable_names_cont1 — try it*Enter into check() what a user would see as the
output of this code.
local = 10
10
nothing
The code will produce an error. - ✔✔nothing
✔✔variable_names_cont2 — try it*Enter into check() what a user would see as the
output of this code.
global = 10
, -- jessica note - the 'global' is in green
10
nothing
The code will produce an error. - ✔✔the code will produce an error
✔✔variable_assignment1 — try it*Enter into check() what a user would see as the
output of this code.
one = 2
#two = 1
three = 3
print( one + two + three )
4
5
6
7
The code will produce an error. - ✔✔the code will produce an error
✔✔variable_assignment2 — try it*Enter into check() what a user would see as the
output of this code.
one = 2
two = 1
three = 3
print( one + two + three )
4
5
6
7
The code will produce an error. - ✔✔6
✔✔variable_assignment3 — try it*Enter into check() what a user would see as the
output of this code.
one = 1
two = 1
three = 3
print( one + two + three )
4
5
6
7
The code will produce an error. - ✔✔5