Search Header Logo

The Code Hunter Quiz

Authored by bekah samuel

Information Technology (IT)

University

Used 2+ times

The Code Hunter 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

20 sec • 1 pt

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

1variable

variable1

variable-1

variable.1

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is an immutable data type in Python?

list

dictionary

set

tuple

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which operator is used for exponentiation in Python?

%

**

^

//

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What keyword is used to define a function in Python?

def

function

func

lambda

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Given the dictionary my_dict = {'letters': ['a', 'b', 'c']}, how would you access the element 'b'?

my_dict['letters'][0]
my_dict['letters'][2]
my_dict['letters'][1]
my_dict['letters'][3]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: print(type([]))?

array

tuple

dictionary

list

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, which method is used to add an element to a list?

add()

append()

push()

insert()

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?