# two functions to create and display a user profile with name and age
    # Create a function called create_profile that: Takes two parameters, name and age.
    # Returns a dictionary with the keys "name" and "age" holding the values passed in.
    # Example: create_profile("Alice", 25) should return {"name": "Alice", "age": 25}.
# Function 1
def create_profile(name, age):
    # Returns a dictionary with name and age
    return{"name":name, "age":age}


#Create another function called display_greeting that:
    # Takes a profile dictionary (like the one returned from create_profile) as its parameter.
    # Prints a personalized greeting, e.g., "Hello, Alice! You are 25 years old."
    # Call the create_profile function to create a profile for a user and store it in a variable. 
    # Then, call display_greeting using the profile you created.
    # Modify display_greeting to check if the age is under 18. 
    # If so, print "Hello, Alice! You are a minor." instead.


#Function 2
def display_greeting(profile):
    name = profile["name"]
    age = profile["age"]

    if age < 18:
        print(f"Hi! {name}, You are a minor")
    else:
        print(f"Hi! {name}, You are {age} years")
    
profile1 = create_profile("Nitheesh", 30)
display_greeting(profile1)

profile2 = create_profile("Munya", 14)
display_greeting(profile2)
