Answered step by step
Verified Expert Solution
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:
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 SolutionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started