Pyhton

Part 1

# Part 1

profile = {
    "name": "Akshaj Gurugubelli",
    "age": 15,
    "city": "San Diego",
    "favorite_color": "Blue"
}
print("Profile:", profile)

Profile: {'name': 'Akshaj Gurugubelli', 'age': 15, 'city': 'San Diego', 'favorite_color': 'Blue'}

Part 2

# Part 2

import random

hobbies = ["Tennis", "Basketball", "Football", "Eating", "Reading", "Coding", "Watching my phone", "Running"]
random_hobby = random.choice(hobbies)
print("This is my hobby", random_hobby)
This is my hobby Reading

Part 3

# Part 3

updated_profile = {
    "name": "Akshaj Gurugubelli",
    "age": 15,
    "city": "San Diego",
    "favorite_color": "Blue",
    "hobbies": ["Tennis", "Basketball", "Football", "Eating", "Reading", "Coding", "Watching my phone", "Running"]
}
print("Profile:", updated_profile)
Profile: {'name': 'Akshaj Gurugubelli', 'age': 15, 'city': 'San Diego', 'favorite_color': 'Blue', 'hobbies': ['Tennis', 'Basketball', 'Football', 'Eating', 'Reading', 'Coding', 'Watching my phone', 'Running']}

Parts 3-6

# Part 3

updated_profile = {
    "name": "Akshaj Gurugubelli",
    "age": 15,
    "city": "San Diego",
    "favorite_color": "Blue",
    "hobbies": ["Tennis", "Basketball", "Football", "Eating", "Reading", "Coding", "Watching my phone", "Running"]
}
print("Profile:", updated_profile)

# Part 4 

hobby_question = (input("Is your hobby available today, answer true or false"))
if hobby_question == "true":
    print ("Your Hobby is available today")
elif hobby_question == "false":
    print ("Your Hobby is not available today")
else:
    print ("Input error, make sure your answer is all lowercase")
    
# Part 5

total_hobbies = len(hobbies)
print(f"I have {total_hobbies} hobbies.")

# Part 6

favorite_hobbies = ("Tennis", "Basketball")
print (f"My favorite hobbies are {favorite_hobbies}")
Profile: {'name': 'Akshaj Gurugubelli', 'age': 15, 'city': 'San Diego', 'favorite_color': 'Blue', 'hobbies': ['Tennis', 'Basketball', 'Football', 'Eating', 'Reading', 'Coding', 'Watching my phone', 'Running']}
Your Hobby is available today
I have 8 hobbies.
My favorite hobbies are ('Tennis', 'Basketball')

Part 7

# Part 7
updated2_profile = {
    "name": "Akshaj Gurugubelli",
    "age": 15,
    "city": "San Diego",
    "favorite_color": "Blue",
    "hobbies": ["Tennis", "Basketball", "Football", "Eating", "Reading", "Coding", "Watching my phone", "Running"],
    "skills" : {"Coding", "Tennis", "Teaching"}
}
print("Profile:", updated2_profile)
print (f"my skills are {updated2_profile['skills']}")

Profile: {'name': 'Akshaj Gurugubelli', 'age': 15, 'city': 'San Diego', 'favorite_color': 'Blue', 'hobbies': ['Tennis', 'Basketball', 'Football', 'Eating', 'Reading', 'Coding', 'Watching my phone', 'Running'], 'skills': {'Teaching', 'Coding', 'Tennis'}}
my skills are {'Teaching', 'Coding', 'Tennis'}

Part 8

#Part 8 

updated3_profile = {
    "name": "Akshaj Gurugubelli",
    "age": 15,
    "city": "San Diego",
    "favorite_color": "Blue",
    "hobbies": ["Tennis", "Basketball", "Football", "Eating", "Reading", "Coding", "Watching my phone", "Running"],
    "skills" : {"Coding", "Tennis", "Teaching"},
    "new_skill" : None
}
print("Profile:", updated3_profile)
print ((f"my skills are {updated3_profile['new_skill']}"))
Profile: {'name': 'Akshaj Gurugubelli', 'age': 15, 'city': 'San Diego', 'favorite_color': 'Blue', 'hobbies': ['Tennis', 'Basketball', 'Football', 'Eating', 'Reading', 'Coding', 'Watching my phone', 'Running'], 'skills': {'Teaching', 'Coding', 'Tennis'}, 'new_skill': None}
my skills are None

Part 9

# Part 9

updated3_profile = {
    "name": "Akshaj Gurugubelli",
    "age": 15,
    "city": "San Diego",
    "favorite_color": "Blue",
    "hobbies": ["Tennis", "Basketball", "Football", "Eating", "Reading", "Coding", "Watching my phone", "Running"],
    "skills" : {"Coding", "Tennis", "Teaching"},
    "new_skill" : None
}
cost_hobbies = len(hobbies) * 5
cost_skills = len(updated3_profile["skills"]) * 10
cost = float(cost_hobbies + cost_skills)
print (cost)
70.0