Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python3: Question 3: (0.5 points) Write a function called format_person_info that receives two mandatory parameters name and age and returns a string containing the

In python3:

image text in transcribed

Question 3: (0.5 points) Write a function called format_person_info that receives two mandatory parameters name and age and returns a string containing the first and last name (disregarding middle names) followed by the phrase "is age years old". For instance print (format_person info('Luis Gustavo Nonato',48) should result in Luis Nonato is 48 years old A third, optional parameter, can also be provided, which specify the job position. For instance print (format_person_info( Luis Gustavo Nonato,48, Data Scientist) should result in Luis Nonato, Data Scientis, is 48 years old def format_person_info(name, age, job-"): In Begin Solution # End Solution Question 4: (2.5 points) Write a unit test for the function format _person info you implemented in question 3. Your unit test should assert the function correctness when two or three parameters are provided In : import unittest # Begin Solution # End Solution

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

Recommended Textbook for

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions

Question

The Nature of Nonverbal Communication

Answered: 1 week ago

Question

=+Where does the focus of labor relations lie? Is it collective

Answered: 1 week ago

Question

=+With whom does the firm have to negotiate?

Answered: 1 week ago