Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

pls run the pytest first: from lab03 import converter # Test cases for converter def test_converter_1(): assert converter([])==[] def test_converter_2(): assert converter([(Chris, Gaucho),(Harry, Potter)])==[Chris G.,

image text in transcribed

pls run the pytest first:

from lab03 import converter # Test cases for converter def test_converter_1(): assert converter([])==[] def test_converter_2(): assert converter([("Chris", "Gaucho"),("Harry", "Potter")])==["Chris G.", "Harry P."] def test_converter_3(): assert converter([("Stephen", "Curry"), ("Kobe", "Bryant"), ("Michael", "Jordan") , ("LeBron", "James"), ("James", "Harden")])== ["Stephen C.", "Kobe B.", "Michael J." , "LeBron J.", "James H."] ####################
def converter(tuplelist): -Given a list of tuples containing student's first and last names return a list of strings with the student's first name, a space, their last name initial, followed by a period. -E.g., if this tuple list was given [("Chris", "Gaucho"), ("Harry", "Potter")] the resulting list would be ["Chris G.", "Harry P."] -If the tuple list is empty return an empty list. return "stub

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

What is success in delivering benefi ts to the organization?

Answered: 1 week ago