
python practice 4

Quiz
•
Other
•
University
•
Medium
Assoc.Prof,IT Chennai
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following commands will create a list?
list1 = list()
list1 = []
list1 = list([1, 2, 3])
all of the mentioned
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output when we execute list(“hello”)?
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
[‘hello’]
[‘llo’]
[‘olleh’]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?
print(list1[2:])
print(list1[:2])
print(list1[:-2])
all of the mentioned
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?
Error
None
25
2
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[25, 20, 5, 5, 4, 3, 3, 1]
[3, 1, 25, 5, 20, 5, 4, 3]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.extend([34, 5])?
[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
[25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[3, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Berhitung

Quiz
•
1st Grade - University
15 questions
Arrays

Quiz
•
University
15 questions
BIOLOGÍA T3

Quiz
•
University
10 questions
Test IQ

Quiz
•
University
10 questions
Neuroeducación - QR

Quiz
•
University
10 questions
Шүд авах үед гарах ерөнхий хүндрэл тест

Quiz
•
University
15 questions
数学5岁

Quiz
•
1st Grade - University
10 questions
כפל עשרוניים

Quiz
•
KG - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Other
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University