Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

What are the steps that the EEOC uses once a charge is filed?

Answered: 1 week ago

Question

What would you do?

Answered: 1 week ago