lexyhallzie
lexyhallzie lexyhallzie
  • 14-01-2021
  • Computers and Technology
contestada

You have this code in your program.

from array import *
K = array('b',[10, 5, 2, 7])

Which line of code will add 12 to the array?

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 19-01-2021

Answer:

K.append(12)

Explanation:

From the question, the array name is K.

In python, to add to an array, you make use of the following syntax.

[array-name].append(value)

In this case:

[array-name] = k

and the value to be added is:

value = 12

So, we have:

K.append(12)

Answer Link

Otras preguntas

Why did the middle class grow during the high middle ages?
Which pattern of interaction is also called the salad bowl theory?
loess deposits consists of what?
Why do you think that the Anti-imperialist League Platform authors refer to the "might makes right" idea as an " ancient heresy?
why is the sign of the number that is multiplied by the hours negative?
The mean value of an instrument in your school’s marching band is $135. Write and solve an equation to find the total value v of all 86 instruments. explain a
I need help 40 points
At the moment she (travel) in the sahara desert. Dan (love) wild animals. He (not visit) alaska at the moment. Matra (not live) in africa . She (stay) in afric
Which statements about velocity is true A. The symbol for velocity is v B. For velocity you must have a number, a unit and direction. C. To calculate velocity,
Which best describes the relationship between evolution and natural selection?