Question: 1. In python, a location within a list stores a. A boolean b. A memory address c. The data itself d. A floating point number

1. In python, a location within a list stores

a. A boolean

b. A memory address

c. The data itself

d. A floating point number

2. If we populate a stack and call get(), we will get the last thing put on the stack

True

False

3. The access the memory location x[2] the computer

a. Takes the memory address of x and adds two times the amount of memory to store a memory address to it.

b. Takes the memory address of x and adds two to it.

c. Goes to memory address two.

d. Goes to memory address two times the amount of memory to store a memory address.

4. In Python, if a list is at capacity and you try to add another element to it

a. Throw an error

b. It will allocate a new, larger chunk of contiguous memory, copy the old memory addresses to it as well as the memory address of the new piece of data.

c. It will allocate a new, larger chunk of contiguous memory, copy the old data to it as the new piece of data.

d. Do nothing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!