What will be the output of the following code?
my_list = [1, 2, 3]
my_list.append(4)
print(my_list)
ט-2 אופציה 2
Quiz
•
Science
•
7th Grade
•
Hard
Levy Roni.Aharon
FREE Resource
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
my_list = [1, 2, 3]
my_list.append(4)
print(my_list)
[1, 2, 3]
[1, 2, 3, 4]
[4, 1, 2, 3]
[1, 2, 3, 4, 4]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method removes the last element of a list?
remove()
pop()
delete()
discard()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in a Python list?
0
1
-1
None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be printed by the following code?
queue = [] queue.append(10) queue.append(20) queue.pop(0) print(queue)
[20]
[10, 20]
[10]
[]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print? name = "Python" print(name[2])
P
y
t
h
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to define a function in Python?
def myFunction:
define myFunction:
def myFunction():
function myFunction:
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the len() function do when used with a list?
Deletes the list
Returns the length of the list
Adds an element to the list
Sorts the list
43 questions
Day 2
Quiz
•
7th Grade
41 questions
7Th Unit 6 Lesson 4-6 Test Review 2
Quiz
•
7th Grade
44 questions
Mid Term Examination IT (2023-24)
Quiz
•
7th Grade
38 questions
Unit 5 Sect. 1 & 2 Exam
Quiz
•
7th Grade
45 questions
Soal TIK Kelas 7 Semester 2
Quiz
•
7th Grade
35 questions
Geological History
Quiz
•
6th - 8th Grade
38 questions
Test #2 Review
Quiz
•
7th Grade
45 questions
2nd Semester Exam Review 7th Grade Life Science
Quiz
•
7th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade