my_dict = {'apple': 5, 'banana': 3, 'orange': 2}
''' Add the key 'apple' to the dictionary only
if it doesn't already exist using the setdefault() method'''
value = my_dict.setdefault('apple', 1)
if value != 1:
print('The key "apple" already exists in the dictionary')
else:
print('The key "apple" has been added with a value of 1')
# Print the updated dictionary
print(my_dict)