Question: Python Q3. Dictionary Challenge Write a function called add_full_name. Given a dictionary that has a firstName key and a lastName key, add_full_name adds a fullName

Python Q3. Dictionary Challenge

Write a function called "add_full_name".

Given a dictionary that has a "firstName" key and a "lastName" key, "add_full_name" adds a "fullName" key whose value is a string with the first name and last name separated by a space. The function returns a new dictionary with the added value.

person = {'firstName': 'Jaden', 'lastName': 'Smith'}

add_full_name(person)

print(person['fullName']) # --> 'Jaden Smith'

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!