Computer Science (Python) > computational-thinking-and-programming-2 > Data Structures
A list contains following record of course details for a University: [Course_name, Fees, Duration] Write the following user defined functions to perform given operations on the stack named Univ: (i) Push_element(): To push an object containing the Course_name, Fees and Duration of a course, which has fees greater than 100000 to the stack. (ii) Pop_element(): To pop the object from the stack and display it. Also, display "Underflow" when there is no element in the stack.
For example: If the lists of courses details are: ["MCA", 200000, 3] ["MBA", 500000, 2] ["BA", 100000, 3]
The stack should contain: ["MBA", 500000, 2] ["MCA", 200000, 3]
Current Session
Community Stats
Track Your Progress
Sign up to save your practice progress and get personalized insights across all topics.