pins = {"Mike":1234, "Joe":1111, "Jack":2222}
pin = int(input("Enter your pin: "))
if pin in pins.values():
nameinp = pins.get(pin)
print("Hello Mr." + nameinp)
fruit = input("Enter fruit: ")
print(find_in_file(fruit))
else:
print("Incorrect pin!")
print("This info can be accessed only by: ")
for key in pins.keys():
print(key)
input()
So the idea is to make greeting screen for the particular person who inserted his own pin code, tried to research didn't find the answer, hope you will help!
Answers to all of you
There is no error, there is a question: how to make that when you put in password that is equal some value, and later when the system recognizes your password prints("Greetings" + value)