Python Basics Quiz

Python Basics Quiz

University

10 Qs

quiz-placeholder

Similar activities

ATP-lab viva

ATP-lab viva

University

10 Qs

Python foundation

Python foundation

5th Grade - University

10 Qs

Python Strings and Variables

Python Strings and Variables

5th Grade - University

8 Qs

Arrays

Arrays

University

15 Qs

Intro to DDP2

Intro to DDP2

University

10 Qs

quiz - 7(exceptions and file handling)

quiz - 7(exceptions and file handling)

12th Grade - University

9 Qs

TEST 1

TEST 1

University

10 Qs

Python set 2

Python set 2

University

10 Qs

Python Basics Quiz

Python Basics Quiz

Assessment

Quiz

Created by

EC M

Other

University

1 plays

Hard

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?