143k views
3 votes
Which line of code will eliminate the element “calculator” from an array of supplies?

ANSWER: D) supplies.remove(“calculator”)

User Nbecker
by
3.8k points

2 Answers

3 votes

Answer:

D

Step-by-step explanation:

User Tmpearce
by
4.0k points
3 votes

Answer:

D) supplies.remove("calculator")

Step-by-step explanation:

Our array's name is "supplies". By starting the line with "supplies", we've defined that this is the subject we wish to edit.

By following it up with .remove, we've told Python that we no longer want to use whatever comes next in our array.

Finally, we use parentheses to define what we wish to remove from out array, which the string provided is ("calculator").

User Kittycat
by
4.1k points