159k views
1 vote
The type code for an int array is 'b'. What line of code creates an array of int data values?

intArray = array('b',[2, 5, 10])
intArray.array('b',[2, 5, 10])
intArray = array('b',2, 5, 10)
intArray.array('b',2, 5, 10)

User Ali B
by
5.9k points

2 Answers

1 vote

Answer:

it's A

Step-by-step explanation:

because The first value in the parentheses is the type code. The second value should be a list of ints. You use square brackets to designate a list.

User Kudlur
by
5.5k points
3 votes

Answer:

intArray=array(’b’,[2,5,10])

Explanation:on edge

User Visual Vincent
by
5.1k points