Question: Fill in the gaps in the nametag function so that it uses the format method to return first _ name and the first initial of

Fill in the gaps in the nametag function so that it uses the format method to return first_name and the first initial of last_name followed by a period. For example, nametag("Jane", "Smith") should return "Jane S."
def nametag(first_name, last_name) :
return ." format }first_name, last_name [0])
print (nametag("Jane", "Smith"))
# Should display "Jane S."
print (nametag("Francesco", "Rinaldi"))
# Should display "Francesco R."
print (nametag("Jean-Luc", "Grand-Pierre"))
# Should display "Jean-Luc G."
11
Reset
 Fill in the gaps in the nametag function so that it

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!