Last Updated on October 10, 2021 by Admin
Python Essentials 1: BASICS _ PE1 — Module 2 Test Exam Answers: Python 2.0 _ 2021 2022
Python Essentials 1: BASICS | |
Answers | Online Test |
Module 1 Test | Online |
Module 2 Test | Online |
Module 3 Test | Online |
Module 4 Test | Online |
Part 1 Summary Test | Online |
Python Essentials 2: INTERMEDIATE | |
Answers | Online Test |
Module 1 Test | Online |
Module 2 Test | Online |
Module 3 Test | Online |
Module 4 Test | Online |
Part 2 Summary Test | Online |
Final Test | Online |
-
The result of the following division:
1/1
- is equal to
1
- is equal to
1.0
- cannot be evaluated
- cannot be predicted
- is equal to
-
The
**
operator:- performs floating
- performs exponentiation
- performs duplicated multiplication
- does not exist
-
What is the output of the following snippet?
x = 1 y = 2 z = x x = y y = z print (x, y)
1 1
1 2
2 2
2 1
Options 4 is the answer
-
Left-sided binding determines that the result of the following expression:
1 // 2 * 3
0.16666666666666666
0
0.0
4.5
Options 2 is the answer
-
What is the output of the following snippet if the user enters two lines containing
3
and6
respectively?333333
666
18
36
Options 1 is the answer
-
What is the output of the following snippet?
x = 1 / 2 + 3 // 3 + 4 ** 2 print (x)
8.5
17
8
17.5
Options 4 is the answer
-
Which of the following statements are true? (Select two answers)
- The right argument of the
%
operator cannot be zero. - The
**
operator uses right-sided binding. - Addition precedes multiplication
- The result of the / operator is always an integer value.
- The right argument of the
-
The value twenty point twelve times ten raised to the power of eight should be written as:
- 20.12E8
- 20E12.8
- 20.12E8.0
- 20.12*10^8
Options 1 is the answer
-
What is the output of the following snippet if the user enters two lines containing
2
and4
respectively?x = int(input()) y = int(input()) x = x / y y = y / x print(y)
8.0
- the code will cause a runtime error
4.0
2.0
Options 1 is the answer
-
What is the output of the following snippet if the user enters two lines containing
2
and4
respectively?x = input () y = input () print(x + y)
6
4
2
24
Options 4 is the answer
-
What is the output of the following snippet?
z = y = x = 1 print(x, y, z, seq='*')
1*1*1
x*y*z
x y z
1 1 1
Options 1 is the answer
-
What is the output of the following snippet?
y = 2 + 3 * 5. print(Y)
17
17.0
- the snippet will cause an execution error
25.
-
What is the output of the following snippet if the user enters two lines containing
11
and4
respectively?x = int(input()) y = int(input()) x = x % y x = x % y y = y % x print(y)
1
4
3
2
Options 1 is the answer
-
The print() function can output values of:
- not more than five arguments
- any number of arguments (excluding zero)
- just one argument
- any number of arguments (including zero)
-
Which of the following variable names are illegal? (Select two answers)
- True
- TRUE
- true
- and
-
What is the output of the following snippet if the user enters two lines containing
2
and4
respectively?x = int(input()) y = int(input()) x = x // y y = y // x print(y)
2.0
8.0
4.0
- the code will cause a runtime error
-
The
\n
digraph forces theprint()
function to:- break the output line
- output exactly two characters:
\
andn
- stop its execution
- duplicate the character next to the digraph
-
The
0o
prefix means that the number after it is denoted as:- hexadecimal
- decimal
- octal
- binary
-
The meaning of the keyword parameter is determined by:
- the argument’s name specified along with its value
- its connection with existing variables
- its position within the argument list
- its value
-
What is the output of the following snippet if the user enters two lines containing
2
and4
respectively?x = int(input()) y = int(input()) print(x+ y)
24
2
6
4
Options 3 is the answer
Python Essentials 1: BASICS | |
Answers | Online Test |
Module 1 Test | Online |
Module 2 Test | Online |
Module 3 Test | Online |
Module 4 Test | Online |
Part 1 Summary Test | Online |
Python Essentials 2: INTERMEDIATE | |
Answers | Online Test |
Module 1 Test | Online |
Module 2 Test | Online |
Module 3 Test | Online |
Module 4 Test | Online |
Part 2 Summary Test | Online |
Final Test | Online |