Question: Complete the body of the format_name function. This function receives first_name and last name, then prints a formatted string of Name: last name, first name

 Complete the body of the format_name function. This function receives first_name

Complete the body of the format_name function. This function receives first_name and last name, then prints a formatted string of "Name: last name, first name" if both names are not blank, or "Name:" with just one of the names, if the other one is blank, and nothing if both are blank. 1. def format_name(first_name, last_name) : 2 # code goes here return 5 print (format_name("Ernest", "Hemingway")) # Should be "Name: Hemingway, Ernest" 6 8 print (format_name", "Madonna")) # Should be "Name: Madonna" 10 11 print (format_name("Voltaire", "")) # Should be "Name: Voltaire" Run 14 15 print(format_name("","")) # Should be Reset

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!