Search Header Logo

Python Day 8

Authored by Ninitha C

Computers

University

Python Day 8
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

List = [2.3, 4.445, 3, 5.33, 1.054, 2.5] print(List.pop()) What willbe the answer?

2.3
2.5
1.054
4.445

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python_____________ are written with round brackets

tuples
dictionary
list
set

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image

Consider the code and What is the result?

('A','B',' ','C','D','EF')
['A','B','C','D','E','F']
{'A','B',' ','C','D','EF'}
['A','B',' ','C','D','EF']

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code aTuple = (100, 200, 300, 400, 500) aTuple[1] = 800 print(aTuple)

TypeError
(100, 800, 200, 300, 400, 500)
(800, 100, 200, 300, 400, 500)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

my_list = ['apple','orange','melon','papaya'] print(my_list[2]) What is the output?

apple
orange
papaya
melon

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these pieces of code would return the name "Harry" from the following list? nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

nameList["1"]
nameList[1]
nameList(4)
nameList["4"]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The list needs one more name added to the end - "Felipe". Which piece of code below would do this? nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

nameList.append(Felipe)
append(nameList,"Felipe")
nameList.append("Felipe")
nameList.append["Felipe",7]

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