Search Header Logo

Py-Hackathon - Week 2 - Day 2

Authored by Alumni Education

Computers

University

Used 17+ times

Py-Hackathon - Week 2 - Day 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What is printed when the following code is written?

have

['have', 'fun']

fun

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What is the output of the following list function?

[10, 20, 30, 40, 50, 60][10, 20, 30, 40, 50, 60]

[10, 20, 30, 40, 50, 60][10, 20, 30, 40, 50, 60, 60]

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What is the output of the following code?

HelloPython-

Hello-Python

-HelloPython

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What is the output of the following list function?

[20, 30, 40, 50][10, 20, 40]

[10, 20, 30, 40][10, 20, 30, 50]

[10, 20, 30, 40][10, 20, 40]

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Select the correct way to print Emma’s age.

student[0][1]

student[1][“age”]

student[0][“age”]

6.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

Select correct ways to create an empty dictionary.

sampleDict = {}

sampleDict = dict()

sampleDict = dict{}

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Select the correct way to access the value of a history subject.

sampleDict[‘class’][‘student’][‘marks’][‘history’]

sampleDict[‘class’][‘student’][‘marks’][1]

sampleDict[‘class’][0][‘marks’][‘history’]

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?