SI 106 written test 1 exam with correct answers
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Which of the following is not a valid variable name?
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer_1
Answer_1
first_answer
1st_answer
answer 1 - correct answer✔✔1st_answer ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer 1 ||\\||\\
What are the two types of cells that we create in Python notebook? - correct
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer✔✔code
markdown
What symbol is used to indicate that a line of code is a comment? - correct
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer✔✔#
What is the output of the following piece of code? If there is an error, explain
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
what is wrong with the code:
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
first_var = 10 ||\\||\\ ||\\||\\
print(first_var)
print(type(first_var))
second_var = 10 != 10 ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
, print(second_var)
print(type(second_var)) - correct answer✔✔output: ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
10
<<class 'int'>> ||\\||\\
False
<<class 'bool'>> ||\\||\\
What is the output of the following code? If the code fails, explain what is wrong
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
with the code.
||\\||\\ ||\\||\\ ||\\||\\
value = input("Enter a value:" ) <<user enters 40>>
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
print(value*3) - correct answer✔✔404040 ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
What is the output of the following piece of code? If the code fails, explain what
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
is wrong with the code.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
value = int(input("Enter a value:" )) <<user enters 40>>
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
print(value*3) - correct answer✔✔120 ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
What is the output of the following piece of code? If the code fails, explain what
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
is wrong with the code.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
their_name = input("Enter your name: ") <<Bobby>> ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
print(f"You have {len(their_name)} letters in your name.") - correct||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer✔✔You have 5 letters in your name. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
What is the return type of each of these functions?
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Which of the following is not a valid variable name?
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer_1
Answer_1
first_answer
1st_answer
answer 1 - correct answer✔✔1st_answer ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer 1 ||\\||\\
What are the two types of cells that we create in Python notebook? - correct
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer✔✔code
markdown
What symbol is used to indicate that a line of code is a comment? - correct
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer✔✔#
What is the output of the following piece of code? If there is an error, explain
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
what is wrong with the code:
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
first_var = 10 ||\\||\\ ||\\||\\
print(first_var)
print(type(first_var))
second_var = 10 != 10 ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
, print(second_var)
print(type(second_var)) - correct answer✔✔output: ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
10
<<class 'int'>> ||\\||\\
False
<<class 'bool'>> ||\\||\\
What is the output of the following code? If the code fails, explain what is wrong
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
with the code.
||\\||\\ ||\\||\\ ||\\||\\
value = input("Enter a value:" ) <<user enters 40>>
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
print(value*3) - correct answer✔✔404040 ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
What is the output of the following piece of code? If the code fails, explain what
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
is wrong with the code.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
value = int(input("Enter a value:" )) <<user enters 40>>
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
print(value*3) - correct answer✔✔120 ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
What is the output of the following piece of code? If the code fails, explain what
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
is wrong with the code.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
their_name = input("Enter your name: ") <<Bobby>> ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
print(f"You have {len(their_name)} letters in your name.") - correct||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
answer✔✔You have 5 letters in your name. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
What is the return type of each of these functions?
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\