204,674 views
37 votes
37 votes
You have the following code in your program.

from array import *
Which line of code would create an array?


E = array([3, 6, 10])

E = array('b',[3, 6, 10])

E.array('b',[3, 6, 10])

E = array('b',3, 6, 10)

User HaaR
by
2.7k points

2 Answers

19 votes
19 votes

Final answer:

The line of code that would create an array is E = array('b',[3, 6, 10]).

Step-by-step explanation:

The correct line of code that would create an array is E = array('b',[3, 6, 10]). In this line, the 'b' indicates that the array is of type signed char, and [3, 6, 10] represents the values that the array will store. The array() function from the 'array' module is used to create the array.

The array object is created using the array() function. It is being used to create an array with the type code "b" and the elements [3, 6, 10] in this line of code. This implies that 'E' will be a variety of marked numbers, and it will contain the qualities 3, 6, and 10.

User Phi
by
2.6k points
17 votes
17 votes

Answer: its c

Explanation: on edge

User Weisj
by
2.7k points