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

If you double me and subtract 500, the answer is 200. What number am i?
On a number line , p has a coordinate -28 and q has a coordinate 31. Find pq
What is the general rule for multiplying a decimal by a negative integer power of 10 definition?
Hellppp!!!!!!!!!!!!!!!!!!! Please lol
You rent a car for $29.95. the first 165 miles are free, but each mile thereafter costs 16 cents. you plan to drive it 200 miles. what is the marginal cost of d
What 2 countries are located entirely within 0 degrees and 10 degrees north latitude 50 degrees and 60 degrees west longitude?
What is the term used to describe when a person treats his or her partner as if he or she is a servant
Simplify your answer as much as possible. -27=5v-2
o trecho que você acabou de ler ,do romance Vidas Secas ,é um período composto .No caderno Reescreva o delimitando as orações que o formam
Leukemia is a type of cancer that prevents a person from being able to make new blood cells. what part of the body develops this kind of cancer?