Python Quiz

Python Quiz

University

11 Qs

quiz-placeholder

Similar activities

Python Programming Quiz

Python Programming Quiz

University

10 Qs

Knowledge Knockout

Knowledge Knockout

University

16 Qs

PROG2013_Quiz_Unit1a

PROG2013_Quiz_Unit1a

University

15 Qs

Understanding Loops in C Programming

Understanding Loops in C Programming

1st Grade - University

15 Qs

prgramming

prgramming

6th Grade - University

11 Qs

Java Quiz (Basics)

Java Quiz (Basics)

University

10 Qs

Quiz 4

Quiz 4

University

10 Qs

Quiz Meet 1 Mini SC Programing

Quiz Meet 1 Mini SC Programing

University

10 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Thanh Sơn Phạm

Used 1+ times

FREE Resource

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Media Image

What will be the output of this code in Python 3?

a) <class 'int'>

b) <class 'float'>

c) <type 'int'>

d) <type 'float'>

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Media Image

What is the result of the following code in Python 2?

a) <type 'int'>

b) <type 'float'>

c) Error

d) None

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Media Image

What will this code output?

a) 3

b) 3.3333...

c) 3.0

d) Error

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following is NOT a valid assignment in Python?

a) x = 1, 2, 3

b) x, y, z = 1, 2, 3

c) x = (y = 2)

d) x = y = z = 10

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Media Image

What will the following code output in Python 3?

a) Success

b) Failure

c) Error

d) None

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Media Image

What will this code output in Python 2?

a) True

b) False

c) Error

d) None

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following is a valid way to check for None in Python?

a) if x == None:

b) if x is None:

c) Both a and b

d) None of the above

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?