NeuraQuiz
Categories
Quizzes
Practice
Blog
About
Login
Start Learning
Categories
Quizzes
Practice
Blog
About
Login
Start Learning
Core Python Function Quiz: Arrange The Steps
Python
25:00
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Question 1
of 39
ADVANCED
+1 XP
Previous
Flag
Submit
Next
Navigator
0/39
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Submit Quiz
ADVANCED
1 pts
python
🐛 Debug
Loading code snippet...
Identify the error in the following Python code snippet and choose the correct fix. The code is intended to calculate the average of a list of numbers.
A
Replace the line with `sum_of_numbers += number` to accumulate the sum.
B
Replace the line with `sum_of_numbers = sum(numbers)` to directly calculate the sum.
C
Replace the line with `sum_of_numbers -= number` to subtract each number.
D
Replace the function with `return sum(numbers) / len(numbers)` to simplify.