Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started