Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions

Question

2. How will the team select a leader?

Answered: 1 week ago