1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
C
The \n digraph forces the print() function to:
A. Stop its execution
B. Duplicate the character next to the digraph
C. Break the output line
D. Output exactly two characters: \ and n
A
What is the output of the following snippet if the user enters two lines containing 2 and 4 respectively?
x = int(input())
y = int(input())
x = x / y
y = y / x
print(y)
A. 8.0
B. The code will cause a runtime error
C. 4.0
D. 2.0
C
What is the output of the following snippet?
z = y = x = 1
print(x, y, z, sep='*')
A. 1 1 1
B. x*y*z
C. 1*1*1
D. 1 x y z
C
What is the output of the following snippet?
x = 1 / 2 + 3 // 3 + 4 ** 2
print(x)
A. 8.5
B. 0
C. 17.5
D. 17
D
What is the output of the following snippet if the user enters 2 and 4 respectively?
x = int(input())
y = int(input())
print(x + y)
A. 2
B. 24
C. 4
D. 6
B and D
Which of the following variable names are illegal? (Select two answers)
A. true
B. and
C. TRUE
D. True
A
The result of the following division:
1 / 1
A. Equal to 1.0
B. Equal to 1
C. Cannot be evaluated
D. Cannot be predicted
C
The ** operator:
A. Does not exist
B. Performs duplicated multiplication
C. Performs exponentiation
D. Performs floating-point multiplication
A
What is the output of the following snippet?
y = 2 + 3 * 5
print(Y)
A. The snippet will cause an execution error
B. 25
C. 17
D. 17.0
D
What is the output of the following snippet?
x = 1
y = 2
z = x
x = y
y = z
print(x, y)
A. 1 2
B. 1 1
C. 2 2
D. 2 1
D
The value twenty point twelve times ten raised to the power of eight should be written as:
A. 20.12*10^8
B. 20E12.8
C. 20.12E8.0
D. 20.12E8
A
What is the output of the following snippet if the user enters 2 and 4 respectively?
x = int(input())
y = int(input())
x = x // y
y = y // x
print(y)
A. The code will cause a runtime error
B. 2.0
C. 8.0
D. 4.0
D
What is the output of the following snippet if the user enters 11 and 4 respectively?
x = int(input())
y = int(input())
x = x % y
x = x % y
y = y % x
print(y)
A. 3
B. 2
C. 4
D. 1
B
The print() function can output values of:
A. Not more than five arguments
B. Any number of arguments, including zero
C. Any number of arguments, excluding zero
D. Just one argument
A
What is the output of the following snippet if the user enters 3 and 6 respectively?
x = input()
y = int(input())
print(x * y)
A. 333333
B. 36
C. 18
D. 666
B
Left-sided binding determines that the result of the following expression:
1 // 2 * 3
is equal to:
A. 0.0
B. 0
C. 4.5
D. 0.166666666666666666
B and D
Which of the following statements are true? (Select two answers)
A. The result of the / operator is always an integer value.
B. The ** operator uses right-sided binding.
C. Adding precedes multiplication.
D. The right argument of the % operator cannot be zero.
D
What is the output of the following snippet if the user enters 2 and 4 respectively?
x = input()
y = input()
print(x + y)
A. 4
B. 2
C. 6
D. 24
B
The meaning of a keyword parameter is determined by:
A. Its value
B. The argument's name specified along with its value
C. Its connection with existing variables
D. Its position within the argument list
D
The 0o prefix means that the number after it is denoted as:
A. Hexadecimal
B. Decimal
C. Binary
D. Octal