Now answer the following based on the code given:
(a) How are the above two functions interrelated?
(i) The function isEmpty(STACK) will be called when pop(STACK) is called
(ii) The function pop(STACK) will be called when is Empty(STACK) is called
(iii) Both functions are implementing recursion
(iv) These functions are not related to each other.
(b) What is the difference in between STACK.pop() and pop(STACK)
(i) Both are pre-defined functions
(ii) Both are user-defined functions
(iii) STACK.pop() is pre defined and pop(STACK) is user defined
(iv) STACK.pop() is user defined and pop(STACK) is pre defined
(c) What is the return type of the function defisEmpty (STACK)
(i) None (ii) void
(iii) int (iv) Boolean
(d) What will the pop(STACK) function return if the stack already consist of [‘A’,’B’] at the position 0 and 1 respectively
(i) A (ii) B (iii) Both A and B (iv) None
(e) if len(STACK) == 0: What is the purpose of this line in the above code:
(i) It checks if the stack is already full
(ii) It checks if the stack can add more value in it or not
(iii) It checks if the stack is already empty
(iv) It checks if the stack exist or not