Search Header Logo

quiz 2

Authored by Pavan kumar

Computers

12th Grade

Used 3+ times

quiz 2
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

45 sec • 1 pt

A data type consisting of numbers, letters and symbols.

String
Integer
Float
Boolean

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Code repeated / looped until a condition has been met or a set number of times.

Sequence
Selection
Iteration
Variable

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Count controlled loop - code executed a given number of times

While loop
For loop
Repeat loop
If...else

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code snippet?

d = {"john":40, "peter":45}

"john" in d

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code snippet?

d = {"john":40, "peter":45}

d["john"]

40

45

“john”

“peter”

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use?

d.delete(“john”:40)

d.delete(“john”)

del d[“john”]

del d(“john”:40)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary which command do we use?

d.size()

len(d)

size(d)

d.len()

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?