Search Header Logo

Python Basics Quiz

Authored by Hanaa Al-Ostad

Computers

12th Grade

Python Basics Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

28 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the function used to take user input in Python?

read_input()

user_input()

get_input()

input()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in Python?

myVariable

my variable

myVariable123

my_variable

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? x = 'Hello' print(x[1:3])

el

He

el

lo

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add an element to the end of a list in Python?

insert()

append()

extend()

remove()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following expression? 5 + 3 * 2

11

16

10

7

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? x = 5 y = 2 print(x % y)

2

0

3

1

7.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following is a valid string in Python?

c) "Hello"

d) Hello

a) 'Hello'

b) Hello

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?