Solve below MCQ’s and Write down correct option below the options
Topic: History of Python
Who is the creator of Python programming language?
a) Dennis Ritchie
b) Bjarne Stroustrup
c) Guido van Rossum
d) James Gosling
ANS : c) Guido van Rossum
In which year was Python first released?
a) 1989
b) 1991
c) 1995
d) 2000
ANS : b) 1991
Python was named after which famous television show?
a) Friends
b) Monty Python's Flying Circus
c) Mr. Bean
d) The Office
ANS : b) Monty Python's Flying Circus
Which organization currently manages the development of Python?
a) Apache Foundation
b) Microsoft
c) Python Software Foundation
d) Oracle
ANS : c) Python Software Foundation
Topic: Introduction to Python
Which of the following is true about Python?
a) It is a low-level programming language
b) It is only used for web development
c) It is a high-level, interpreted language
d) It does not support object-oriented programming
ANS : c) It is a high-level, interpreted language
Python files typically have the extension:
a) .pyx
b) .pt
c) .py
d) .p
ANS : c) .py
Which of the following is not a valid use of Python?
a) Data Science
b) Operating System Design
c) Web Development
d) Machine Learning
ANS : b) Operating System Design
Which of the following is the correct way to display output in Python?
a) print "Hello"
b) echo("Hello")
c) cout << "Hello"
d) print("Hello")
ANS : d) print("Hello")
Topic: Features of Python
Which feature of Python makes it suitable for beginners?
a) Low-level memory management
b) Complex syntax
c) Simple and readable syntax
d) Requires compilation before execution
ANS : c) Simple and readable syntax
Which of the following is a key feature of Python?
a) Static typing
b) Compiled language
c) Dynamic typing
d) Platform dependent
ANS : c) Dynamic typing
Python supports which programming paradigms?
a) Object-Oriented
b) Functional
c) Procedural
d) All of the above
ANS : d) All of the above
Which of these makes Python platform-independent?
a) Python is written in Java
b) Python code runs only on Windows
c) Python code is interpreted
d) Python requires system-specific compilers
ANS : c) Python code is interpreted
Topic: Variables
Which of the following is a valid variable name in Python?
a) 2value
b) value#
c) _value
d) value@1
ANS : c) _value
What will be the output of this code?
a = 10
b=a
print(b)
a) 0
b) 10
c) a
d) Error
ANS : b) 10
Which keyword is used to define a constant variable in Python?
a) const
b) final
c) constant
d) Python does not have built-in constant support
ANS : d) Python does not have built-in constant support
Topic: Arithmetic Operators
What will be the result of 7 % 3 in Python?
a) 2
b) 1
c) 3
d) 0
ANS :
Which operator is used for exponentiation in Python?
a) ^
b) **
c) exp
d) pow
ANS : b) **
What is the output of 10 // 3 in Python?
a) 3.33
b) 3
c) 4
d) 3.0
ANS : b) 3
Topic: Comparison Operators
Which operator is used to check if two values are not equal in Python?
a) !
b) <>
c) !=
d) ~=
ANS : c) !=
What will be the output of this code?
print(5 >= 3)
a) False
b) True
c) Error
d) None
ANS : b) True