Search Header Logo

Python module 1

Authored by KRUPA CHOTAI

Computers

University

Used 6+ times

Python module 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Tutorials Point' [100:200]?

Index error

' '

'Tutorials Point'

Syntax error

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

what is the output

a = (1, 2)

a[0] +=1

(1,1,2)

2

type error

syntax error

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the value of this expression?

2**2**3**1

12

64

128

256

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code?

list = ['a','b','c','d','e']

list += 'de'

print(list)

['a','b','c','d','e']

['a','b','c','de']

['a','b','cde']

This raises an exception because we cannot add a string to a list

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

val=154

while(not(val)):

val**=2

else:

val//=2

77

154

11858

23716

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

s = 0

for d in range(0, 5, 0.1):

… s += d

… print(s)

syntax error

type error

runtime error

both C & D

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

import math

def main():

math.cos(math.pi)

main()

print(main())

1

None

Error

math.pi is not defined

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