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 I score 13 out of 24 in a test , what percentage is this ?
help me with this? cause I dont really understand this.
If I score 13 out of 24 in a test , what percentage is this ?
What number should be added to the expression x^2 + 14x to change it into a perfect square trinomial? Can you help me with this?
SOLVING SYSTEMS OF EQUASIONS BY ELIMINATION. -4x-2y=-12 4x+8y=-24
How do I work out the problem 19 divided by 5728
Tamara is reviewing recent orders at her deli to determine which meats she should order. She found that of 1,000 orders, 450 customers ordered turkey, 375 custo
From the book Fahrenheit 451, What is the cliffhanger from part 2, The Sieve and the Sand??
Which substances have atoms of the same element but different molecular structures?A. He(g) and Ne(g)B. K(s) and Na(s)C. O2(g) and O3(g)D. P4(s) and S8(s)
Why is the UK a developed country?