Search Header Logo

Python Quiz Challenge

Authored by Julio Hernandez Saca

Other

8th Grade

Used 4+ times

Python Quiz Challenge
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Question 1:

Which of the following is the correct way to declare three variables in Python?

a) variable1, variable2, variable3

b) var1, var2, var3

c) name, age, city

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Question 2: (Pts: 5)

What will the following code print?

favorite_colors = ["red", "blue", "green"]

print(favorite_colors[1])

a) red

b) blue

c) green

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Question 3:

Which data structure is immutable in Python?

a) List

b) Tuple

c) Dictionary

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Question 4: (Pts: 10)

What arithmetic operation is performed by the following code snippet?

num1 = int(input("Enter the first number: "))

num2 = int(input("Enter the second number: "))

result = num1 * num2

print(result)

a) Addition

b) Subtraction

c) Multiplication

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to sort a list in ascending order?

a) sort()

b) reverse()

c) count()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the index of the first occurrence of the element 'banana' in the following list?

fruits = ['apple', 'banana', 'orange', 'banana']

a) 0

b) 1

c) 2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method is used to add an element to the end of a list?

a) append()

b) remove()

c) in keyword()

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?