What is the output of the following code?
x = [1, 2, 3]
y = x
y.append(4)
print(x)
ML 2
Quiz
•
Information Technology (IT)
•
Professional Development
•
Easy
Siri Chakkala
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
x = [1, 2, 3]
y = x
y.append(4)
print(x)
[1, 2, 3]
[1, 2, 3, 4]
[4]
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to create a NumPy array from a list?
np.array([1, 2, 3])
np.list([1, 2, 3])
np.make_array([1, 2, 3])
np.arraylist([1, 2, 3])
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the shape of the following NumPy array?
arr = np.array([[1,2,3],[4,5,6]])
(3,2)
(2,3)
(1,6)
(6,)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following plots is best suited to display the distribution of a numerical variable?
Line plot
Bar Chart
Histogram
Pie Chart
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about Python lists and tuples is TRUE?
Tuples are mutable, lists are immutable
Lists are faster than tuples
Tuples are immutable, lists are mutable
Tuples can be modified after creation
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to plot a line graph using Matplotlib?
plot(x, y)
plt.line(x, y)
plt.plot(x, y)
graph.plot(x, y)
8 questions
Bucles
Quiz
•
Professional Development
10 questions
VEX Global Variables and Channels 2
Quiz
•
Professional Development
10 questions
[March] Download (+) Assessment
Quiz
•
Professional Development
10 questions
Quiz on Arrays in C++
Quiz
•
Professional Development
10 questions
[FE] Ice Breaking - JavaScript Control Flow
Quiz
•
Professional Development
15 questions
Mastering JavaScript Array Methods
Quiz
•
Professional Development
11 questions
KUIZ DIGITAL GURU
Quiz
•
Professional Development
5 questions
14/12/2024 - Array
Quiz
•
Professional Development
25 questions
Equations of Circles
Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)
Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System
Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice
Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers
Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons
Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)
Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review
Quiz
•
10th Grade