Bonus assignment: Challenge Add a Key-Value Pair Only if the Key is Not in the Dictionary
Today I was very bored so I checked my bonus assignments and I got this. Write a Python program that adds a new key-value pair to a dictionary only if the key doesn’t exist already. If the key-value pair exists in the dictionary, do not update the existing value. The dictionary should not be modified in this case. Store the new key in the new_key variable and the new value in the new_value variable. Print the final value of the dictionary. ...