Python debugging

Python debugging

University

10 Qs

quiz-placeholder

Similar activities

GIS Unit-1

GIS Unit-1

University

15 Qs

Microcontroller

Microcontroller

11th Grade - University

10 Qs

Input, output and storage de

Input, output and storage de

8th Grade - Professional Development

14 Qs

BCA

BCA

University

10 Qs

Tin 8/1

Tin 8/1

KG - University

10 Qs

Assessment 08

Assessment 08

University

15 Qs

Prework Etapa 1 - Bogotá

Prework Etapa 1 - Bogotá

University

10 Qs

Ulangan harian 1 Algoritma dan Pemrograman

Ulangan harian 1 Algoritma dan Pemrograman

12th Grade - University

13 Qs

Python debugging

Python debugging

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

vijayanandh ece

Used 265+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Find the output of the code:

# abc.py

def func(n):

return n + 10


func('Hello')

2.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Find the output of the code:


nameList = ['Harsh', 'Pratik', 'Bob', 'Dhruv']

print nameList[1][-1]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the output of the code:

for i in range(2):

print i


for i in range(4,6):

print i

0,1,4,5

0,1,2,4,5,6

0,1,2,3,4,5,6

2,4,6

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the output of the code:

geekCodes = [1, 2, 3, 4]

geekCodes.append([5,6,7,8])

print len(geekCodes)

4

5

6

8

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the output of the code:

check1 = ['Learn', 'Quiz', 'Practice', 'Contribute']

check2 = check1

check3 = check1[:]

check2[0] = 'Code'

check3[1] = 'Mcq'

count = 0

for c in (check1, check2, check3):

if c[0] == 'Code':

count += 1

if c[1] == 'Mcq':

count += 10

print count

10

11

12

13

6.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

What is the output of the code:

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

d2 = {"john":466, "peter":45}

print d1 > d2

True

False

Not applicable

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the output of the code:

D = {1 : 1, 2 : '2', '1' : 1, '2' : 3}

D['1'] = 2

print(D[D[D[str(D[1])]]])

2

3

'2'

Key error

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?

Discover more resources for Computers