STACK
STACK
1.STACK.pop( )
2.STACK.append(99)
3.STACK.append(87)
4.STACK.pop( )
Q.9 Julie has created a dictionary containing names and marks as key value pairs of
6 students. Write a program, with separate user defined functions to perform the
following operations:
1.Push the keys (name of the student) of the dictionary into a stack, where the
corresponding value (marks) is greater than 75.
2.Pop and display the content of the stack
For example:
If the sample content of the dictionary is as follows:
R={“OM”:76, “JAI”:45, “BOB”:89, “ALI”:65, “ANU”:90, “TOM”:82}
The output from the program should be: TOM ANU BOB OM
R={"OM":76, "JAI":45, "BOB":89, "ALI":65, "ANU":90, "TOM":82