
list sort and concatenation
Quiz
•
Computers
•
12th Grade
•
Hard
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"
Similar Resources on Wayground
10 questions
Pre tes dan Post test
Quiz
•
12th Grade
12 questions
Python Unit 2 Quiz 2
Quiz
•
9th - 12th Grade
9 questions
12th comp app lesson 6
Quiz
•
12th Grade
9 questions
Python Programming Basics
Quiz
•
6th - 12th Grade
7 questions
java podstawy
Quiz
•
9th Grade - University
10 questions
Arrays
Quiz
•
10th - 12th Grade
12 questions
Python Operators
Quiz
•
12th Grade
10 questions
Computer Software
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade