Completed Exercise 8-13 User Profiles

This commit is contained in:
cheeks 2025-02-21 14:04:52 +00:00
parent a3aa5c7bf8
commit 9e835ac2c4

View File

@ -0,0 +1,16 @@
# Exercise 8-13 User Profile
# Learning Objective: Create a function that takes in two predefined key-value pairs and add 3 arbitrary ones.
# user_profile.py
def build_profile(first, last, **user_info):
"""Build a dictionary containing everything we know about a user."""
user_info['first_name'] = first
user_info['last_name'] = last
return user_info
user_profile = build_profile('mister', 'cheeks',
location='united states',
favorite_color='orange',
favorite_meal='scrambled eggs')
print(user_profile)