|
Que No. 1 ) What is Python?
A.) A type of snake
B.) A high-level programming language
C.) A character in a famous novel
D.) A type of dessert
|
Que No. 2 ) Which of the following is a valid Python variable name?
A.) 123variable
B.) _myVariable
C.) break
D.) @myVariable
|
Que No. 3 ) What is the result of 5 + 3 * 2 in Python?
A.) 10
B.) 16
C.) 11
D.) 26
|
Que No. 4 ) Which of the following data types is used to represent whole numbers in Python?
A.) Float
B.) String
C.) Integer
D.) Boolean
|
Que No. 5 ) How do you print "Hello, World!" to the console in Python?
A.) echo "Hello, World!"
B.) print("Hello, World!")
C.) console.log("Hello, World!")
D.) printf("Hello, World!")
|
Que No. 6 ) What is the correct way to declare a Python list?
A.) list my_list = [1, 2, 3]
B.) my_list = (1, 2, 3)
C.) my_list = [1, 2, 3]
D.) my_list = {1, 2, 3}
|
Que No. 7 ) What is the output of the following code snippet: print("Python" * 3)?
A.) PythonPythonPython
B.) 9
C.) Python3
D.) Error
|
Que No. 8 ) Which statement is used to exit a loop prematurely in Python?
A.) return
B.) exit
C.) break
D.) continue
|
Que No. 9 ) What is the purpose of the "input()" function in Python?
A.) To display text on the console
B.) To read user input from the console
C.) To generate random numbers
D.) To perform mathematical calculations
|
Que No. 10 ) How do you comment out a single line of code in Python?
A.) // This is a comment
B.) /* This is a comment */
C.) # This is a comment
D.) -- This is a comment
|