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
Get step-by-step solutions from verified subject matter experts
