Search Header Logo

Python and NumPy MCQ Quiz

Authored by Wasiha Tasneem

Computers

University

Used 1+ times

Python and NumPy MCQ Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid Python variable name?

2ndVariable

_variable

variable-name

variable name

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to raise a number to a power in Python?

^

**

//

pow()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of: 'vinayak' in 'vinayak123'?

True

False

Error

None

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Python statement is used to exit a loop prematurely?

continue

pass

exit

break

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is **not** supported in Python?

else with for loop

do-while loop

Nested if

Shorthand if-else

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following collections is **immutable**?

List

Dictionary

Tuple

Set

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'in' operator check in Python?

Membership

Identity

Equality

Reference

Access all questions and much more by creating a free account

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

Already have an account?

Discover more resources for Computers