Python Operators, Expressions and Errors Quiz

Python Operators, Expressions and Errors Quiz

10th Grade

17 Qs

quiz-placeholder

Similar activities

G10 Python Exam

G10 Python Exam

10th Grade

15 Qs

Foundations of Programming

Foundations of Programming

9th - 10th Grade

18 Qs

Procedures and Functions

Procedures and Functions

10th Grade

20 Qs

Print command Quiz Day2

Print command Quiz Day2

5th - 12th Grade

16 Qs

Python Arithmetic, Boolean, and Strings

Python Arithmetic, Boolean, and Strings

9th - 12th Grade

14 Qs

Printing in Python

Printing in Python

6th - 10th Grade

12 Qs

Python Operators & Expressions

Python Operators & Expressions

8th - 11th Grade

13 Qs

Python - Creating Programs

Python - Creating Programs

9th - 11th Grade

14 Qs

Python Operators, Expressions and Errors Quiz

Python Operators, Expressions and Errors Quiz

Assessment

Quiz

Computers

10th Grade

Medium

Created by

Sandeep M

Used 3+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following operators is used for exponentiation in Python?

^

**

*

%

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be the result of the following expression? x = 10 y = 3 result = x // y

3.33

3

3.0

4

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Identify the error in the following code: python print("Hello, world!)

SyntaxError

NameError

TypeError

IndexError

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the % operator do in Python?

Exponentiation

Modulo (remainder after division)

Floor division

Multiplication

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following expressions evaluates to a floating-point number?

10 / 2

5 * 2

3 // 2

2 ** 3

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Identify the error in the following code: num1 = 5 num2 = "2" result = num1 + num2

TypeError: unsupported operand type(s)

SyntaxError: invalid syntax

NameError: undefined variable

ValueError: invalid literal for int() with base 10

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result of the expression 7 // 2 in Python?

3.5

3

3.0

4

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?