Menu

(Solved) : Write Functions Python 3 Code Fulfills Requirements Described Question Parts Return List N Q43971356 . . .

Write functions with python 3 code that fulfills therequirements 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. Youmay 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 theirage. 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 astring a palindrome if it is symmetric when ignoringcapitalization, punctuation, digits, and spaces. In other words weare only considering the alphanumerical characters. Hint.isalpha()

Expert Answer


Answer to Write functions with python 3 code that fulfills the requirements described in the question parts: a) Return a list of t…

OR