UNIT2&3 PYTHON QUIZ

UNIT2&3 PYTHON QUIZ

KG - University

25 Qs

quiz-placeholder

Similar activities

ITIPT01 Quiz No 1

ITIPT01 Quiz No 1

University

20 Qs

Ms. Ayesha's Python Quiz

Ms. Ayesha's Python Quiz

7th Grade

20 Qs

Module 1 Exercise (Python)

Module 1 Exercise (Python)

Professional Development

20 Qs

Dictionary in Python

Dictionary in Python

10th - 12th Grade

20 Qs

Computer Basics Review

Computer Basics Review

6th Grade

22 Qs

Year 8 Python -input-output-selection

Year 8 Python -input-output-selection

8th - 9th Grade

20 Qs

Python Print Statement

Python Print Statement

6th - 10th Grade

20 Qs

Python Quiz

Python Quiz

KG - 6th Grade

22 Qs

UNIT2&3 PYTHON QUIZ

UNIT2&3 PYTHON QUIZ

Assessment

Quiz

Computers

KG - University

Hard

Created by

Humera I

Used 6+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

4 is 100 in binary and 11 is 1011. What is the output of the following bitwise operators?

a = 4

b = 11

print(a | b)

print(a >> 2)

15 1

14 1

13 1

15 0

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the expression print(-18 // 4)

-4

5

-5

4

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of print(2 * 3 ** 3 * 4)

512

216

864

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following assignment operator?

x=2

y = 10

x +=y+ 2

print(x)

12

13

14

15

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code

print(bool(0), bool(3.14159), bool(-3), bool(1.0+1j))

True True False True

False True False True

True True False True

False True True True

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following Python code

x = 10

y = 50

if (x ** 2 > 100 and y < 100):

print(x, y)

100 500

None

10 50

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following addition (+) operator

a = [10, 20]

b = a

b += [30, 40]

print(a)

print(b)

[10, 20, 30, 40]

[10, 20, 30, 40]

[10, 20]

[10, 20, 30, 40]

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?