Question: Write functions with python 3 code that fulfills the requirements described in the question parts: a) Return a list of the non-duplicate items from the

Write functions with python 3 code that fulfills the requirements described in the question parts:

a) Return a list of the non-duplicate items from the parameter (an iterable)

b) return a reversed version of the parameter, using slicing. The parameter can be a list or tuple.

c) return a sorted list, ordered by age in descending order. You may assume the following structure qbs = [ ("Tom Brady", 42), ("Drew Brees", 40), ("Aaron Rogers", 36), ("Joe Montana", 63), ("Dan Marino",58)]

d) return a dictionary mapping the quarterbacks name to their age. Their name must include the first and last name. Hint: join, zip. This can be done in a dictionary comprehension.

output = {"Tom Brady" : 42, "Drew Brees" : 40, ... etc.}

names = [("Tom", "Brady"), ("Drew", "Brees"), ("Aaron", "Rogers"), ("Joe", "Montana"), ("Dan", "Marino")]

ages = [42, 40, 36, 63, 58]

e) Determine if a given string is a palindrome. We consider a string a palindrome if it is symmetric when ignoring capitalization, punctuation, digits, and spaces. In other words we are only considering the alphanumerical characters. Hint .isalpha()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!