# Define the dictionary
d = {1: 10, 2: 20, 3: 30, 4: 40, 5: 50}
# Prompt the user to enter a key
key = int(input("Enter a key: "))
# Check if the key exists in the dictionary and return the corresponding value
if key in d:
print("The value for key {key} is:", d[key])
else:
print("Key not found in the dictionary.")
To embed this project on your website, copy the following code and paste it into your website's HTML: