list sort and concatenation

list sort and concatenation

12th Grade

9 Qs

quiz-placeholder

Similar activities

Kiểu dữ liệu xâu kí tự - xử lí xâu kí tự

Kiểu dữ liệu xâu kí tự - xử lí xâu kí tự

9th - 12th Grade

14 Qs

Python Fundamentals and Programming

Python Fundamentals and Programming

11th - 12th Grade

13 Qs

Unit 4 Review

Unit 4 Review

9th - 12th Grade

11 Qs

Practice for 8th AP Java Quiz

Practice for 8th AP Java Quiz

10th - 12th Grade

14 Qs

MATLAB 2

MATLAB 2

KG - University

10 Qs

python String and comment

python String and comment

3rd Grade - University

13 Qs

Python - kl. 8

Python - kl. 8

7th - 12th Grade

10 Qs

Tes Sumatif Fase E

Tes Sumatif Fase E

9th - 12th Grade

10 Qs

list sort and concatenation

list sort and concatenation

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Jumanah Alqurnah

Used 5+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following Python code print the list X in a reverse order

a) print(X.reverse ())

b) X.sort(reverse= FALSE)

print(X)

c) print(X[: : -1])

d) b and c.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following Python code sort the list X in an ascending order:

sort.X( )

X.sort[ ]

X.sort(reverse = True)

X.sort( )

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following python code adds the List 1 as an extension to the original List 2

a) List1.extend(List2)

b) List2.extend(List1)

c) List1.append(List2)

d) a and c.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Let x= "17" and y=["My age is"], the output of print(x + y) is ["My age is", "17"]

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following Python code sort the list x in an descending order:

x.reverse ( )

x.sort( )

x.sort(key = len)

x.sort(reverse = True)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

let x = [2,5,0,8,9], the output of the following Python code is

x.reverse( )

print(x[0])

x.sort(key=len)

print(x)

9

Error

2

[9, 8, 0,5,2]

9

[0, 2, 5, 8, 9]

2

[0, 2, 5, 8, 9]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

let x= ["my name is"] and y = "Ali", which of the following Python code will print my name is Ali as a string

print(x +[ y ])

print(str(x) + y)

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Let x= ["my name is"] and y = ["Ali"], the output of the following Python code is

print(x + y)

print(x)

x.extend(y)

print(x)

['my name is', 'Ali']

['my name is', 'Ali']

['my name is', 'Ali']

['my name is Ali']

['my name is']

['my name is', 'Ali']

['my name is', 'Ali']

['my name is']

['my name is', 'Ali']

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

let x= ["my name is"] and y = "Ali", the output of the following Python code is

print(str(x) + y)

['my name is']Ali

["my name is", "Ali"]

"my name is Ali"

Discover more resources for Computers