Two list Lname and Lage contains name of person and age of person respectively. Write functions as details given below
(i) Push_na() :- it will push the tuple containing pair of name and age from Lname and Lage whose age is above 50
(ii) Pop_na() :- it will remove the last pair of name and age and also print name and age of removed person. It should also print “underflow” if there is nothing to remove
For example the two lists has following data
Lname=[‘narender’, ‘jaya’, ‘raju’, ‘ramesh’, ‘amit’, ‘Piyush’]
Lage=[45,23,59,34,51,43]
After Push_na() the contains of (Lname,age) stack is
[(‘raju’,59),(‘amit’,51)]
The output of first execution of pop_na() is
The name removed is amit
The age of person is 51