![]() |
VOOZH | about |
Question 1
Which of the following is a valid way to comment in Python?
// This is a comment
# This is a comment
<!-- This is a comment -->
/* This is a comment */
Question 2
What is the result of the following expression in Python: 5 + 2 * 3
21
17
11
1
Question 3
What will be the output of the following code snippet?
2.5
2
2.0
2.00
Question 4
What is the output of the following code?
15
"555"
8
"333"
Question 5
What is the output of the following code?
4.5
10.0
8.0
12.0
Question 6
What is the output of the following code?
7
52
10
3
Question 7
Which of the following statements is true about Python variables?
Variables must be declared before they are used.
Variables can contain only letters.
Python variables are case-sensitive.
Python variables cannot be reassigned.
Question 8
Which of the following is the correct way to take user input in Python?
input()
get_input()
user_input()
read_input()
Question 9
Which of the following is the correct type conversion for converting a floating-point number to an integer in Python?
int(float_num)
integer(float_num)
float_to_int(float_num)
convert_int(float_num)
Question 10
What is the value of result in the following code?
13
"85"
58
"13"
There are 15 questions to complete.