Search Header Logo

C4M2-S7-J1-ListsetTuples

Authored by Rasha Ali

Computers

University

Used 1+ times

C4M2-S7-J1-ListsetTuples
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Quelle est la sortie du code suivant ?

list = [ 'Tech', 404, 3.03, 'Beamers', 33.3 ]

print(list[1:3])

[ 'Tech', 404, 3.03, 'Beamers', 33.3 ]

Aucune des réponses

[404, 3.03] 

['Tech', 'Beamers']

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Quelle est la valeur des couleurs[2] ? 

couleurs = ['rouge', 'orange', 'jaune', 'vert', 'bleu', 'indigo', 'violet']

bleu


orange

indigo

jaune

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Si le code suivant est exécuté en Python, quel serait le résultat ?

num = '5'*'5'

27

TypeError : impossible de multiplier la séquence par la non-int du type 'str' 

9

55555

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

list1 = list("Technology")

#Crée une liste avec les caractères T, e, c, h, n, o, l, o, g, y

Vrai

Faux

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

list1=['t', 'e', 'c', 'h', 'n', 'o', 'l', 'o', 'g', 'y']

max(list1)

't'

'g'

'y'

'e'

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

list1=['t', 'e', 'c', 'h', 'n', 'o', 'l', 'o', 'g', 'y']

sum(list1)

154

345

12

TypeError: unsupported operand type(s) for +: 'int' and 'str'

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

list1=['I', 'love']

list2=['data', 'and' , 'python']

list3 = list1+list2

list3

TypeError: unsupported operand type(s) for +

['I', 'love', 'data', 'and', 'python']


34

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?