
Python Basics till Logical Operators
Authored by Mayank Saxena
Computers
University
Used 15+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Who developed the Python programming language?
James Gosling
Guido van Rossum
Dennis Ritchie
Bjarne Stroustrup
Answer explanation
Python was developed by Guido van Rossum. He wanted to create a language that was easy to learn, powerful, and versatile.
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
In which year was Python first released?
1995
1989
1991
2000
Answer explanation
Python's first public release occurred in February 1991. It was designed to emphasize readability and simplicity.
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Why is the language named 'Python'?
It is named after a type of snake.
It was an acronym for "Program Your Tasks on Numbers."
It is a randomly chosen name.
Guido van Rossum was a fan of the television show "Monty Python's Flying Circus."
Answer explanation
The name "Python" was chosen because Guido van Rossum was a fan of the British comedy series "Monty Python's Flying Circus," and he wanted the name to be short, unique, and slightly mysterious.
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What was the major feature introduced in Python 2.0?
Object-oriented programming
Garbage collection using reference counting
List comprehensions
Dynamic typing
Answer explanation
Python 2.0, released in 2000, introduced many features, one of which was list comprehensions. This feature allowed for more concise and readable syntax for creating lists.
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following statements is true about Python 3?
It is backward-compatible with Python 2.
It was released in 2008 to address the shortcomings of Python 2.
Python 3.0 introduced the print statement.
Python 3 removed support for object-oriented programming.
Answer explanation
Python 3.0 was released in December 2008 and was not backward-compatible with Python 2. Its main goal was to fix design flaws in Python 2 and improve language consistency.
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following operators has lower precedence than the comparison operators (e.g., ==, <, >)?
Logical OR (or)
Addition (+)
Bitwise AND (&)
Exponentiation (**)
Answer explanation
Logical operators like not, and, or have lower precedence than comparison operators in Python. This means that comparisons are evaluated before logical operations unless parentheses are used.
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is the associativity of the assignment operator = in Python?
Left-to-right
Right-to-left
Non-associative
Undefined
Answer explanation
The assignment operator = in Python has right-to-left associativity. This means a = b = 5 is evaluated as b = 5 first, and then a = b.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?