Python Basics till Logical Operators

Python Basics till Logical Operators

University

35 Qs

quiz-placeholder

Similar activities

Python Operators

Python Operators

University

35 Qs

String

String

10th Grade - University

30 Qs

9th Grade - IT Programming - 2nd Cycle Exam

9th Grade - IT Programming - 2nd Cycle Exam

9th Grade - University

40 Qs

Python Review 1

Python Review 1

9th Grade - University

30 Qs

10th Grade 10  - IT Programming - 2nd Cycle Exam

10th Grade 10 - IT Programming - 2nd Cycle Exam

10th Grade - University

40 Qs

Python - Intro

Python - Intro

University

30 Qs

PYTHON

PYTHON

University

30 Qs

python

python

KG - Professional Development

30 Qs

Python Basics till Logical Operators

Python Basics till Logical Operators

Assessment

Quiz

Computers

University

Medium

Created by

Mayank Saxena

Used 2+ times

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?