Python Basics Quiz

Python Basics Quiz

University

10 Qs

quiz-placeholder

Similar activities

all about eli part 2

all about eli part 2

1st Grade - University

10 Qs

Statistics for Psychology - Quiz 2

Statistics for Psychology - Quiz 2

University

10 Qs

HTE13767_QUIZ 15%

HTE13767_QUIZ 15%

University

15 Qs

IQ IN BPB MODULE 8

IQ IN BPB MODULE 8

University

10 Qs

Latest Technology in Modern Hotel

Latest Technology in Modern Hotel

University

10 Qs

QUIZ 1 - RIZAL

QUIZ 1 - RIZAL

KG - Professional Development

10 Qs

Do You Really Know ME?

Do You Really Know ME?

5th Grade - University

13 Qs

EPP QUIZ

EPP QUIZ

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?