Python Basics Quiz

Python Basics Quiz

University

10 Qs

quiz-placeholder

Similar activities

among us

among us

1st Grade - Professional Development

10 Qs

Data Type Review

Data Type Review

KG - Professional Development

12 Qs

Chapter 1 Measurement Standards and Unit

Chapter 1 Measurement Standards and Unit

University

10 Qs

control system

control system

University

10 Qs

Basics of Python

Basics of Python

University

8 Qs

Mastering Python Data Structures

Mastering Python Data Structures

University

10 Qs

C PROGRAMMING

C PROGRAMMING

University

15 Qs

Undertale AU

Undertale AU

5th Grade - University

10 Qs

Python Basics Quiz

Python Basics Quiz

Assessment

Quiz

Other

University

Hard

Created by

EC M

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the expression 'x = 5; y = 10; print(x == y)'?

Error

False

True

None

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to declare a string in Python?

name = 'Alice'

name = "Alice"

name = Alice

Both 1 and 2

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the modulus operator (%) do?

Returns the remainder of a division

Adds two numbers

Multiplies two numbers

Subtracts two numbers

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a comparison operator in Python?

<

===

!=

==

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of 'print(10 // 3)'?

3.33

4

Error

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'elif' statement in Python?

To create a loop

To define a function

To end a program

To check multiple conditions

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a logical operator in Python?

or

not

and

All 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?