Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

what the answer for the question shown.pls explain when provide the answer.. Que

ID: 3748364 • Letter: W

Question

what the answer for the question shown.pls explain when provide the answer..

Question 20 5 pts Which statement is true about heap and stack memory? Local variables and their values are stored in heap memory whereas formal parameters and their data value are stored in stack memory o O Local variables are stored in stack memory whereas data values are stored in heap memory O Local variables and their values are stored in stack memory whereas formal parameters and their data value are stored in heap memory 0 Local variables are stored in heap memory whercas data values are stored in stack memory

Explanation / Answer

1. Answer is option 1

reason : In the heap memory , the objects and instance variables are stored.The variable references(either primitive or object references ) are stored in stack.So, here the local variables are stored in heap and formal parameters and it's data values are stored in stack memory are.

2. Answer is option 4

reason : since i is range is 2.That is it will iterate from 0, 1 and

for j it has range it 1. That means it will iterate through 0

so the output will be :

0 0

1 0

3. Answer is option 1.

reason : In the question it is mentioned that first variable holds one of 6,8 ,9.That means a varible cannot hold multiple values at the same time.So,it should be or condition.even we can choose these using the tuple.That will select one of the values if and only we write in a loop.

4.Answer is option 4.

reason : In the software development life cycle(SDLC), in the create design phase , one has to find out the mapping between the inputs and outputs.

5.Answer is option 3.

reason : In python we don't include the semicolon at the end of any statements.In the question it is mentioned that semicoln after the declaration,So it is syntax error.

6.Answer is option 2.

reason : The code inside the function is not executed when the function is defined.

7.Answer is option 1.

reason : since it is mentioned that customers details are added in the order,list is the only data structure which keeps elements in the order.So, when the order is important we always go with list.