Monday, November 30, 2020

conditional expression code :

 '''password  = 2580

pin = int(input("Enter your code\n"))
oldpin = 7860
forgetpin = int(input("Enter your old pincode:\n"))
# 1. if-elif-else ladder in Python
if(pin == password): 
    print("open\n")
elif(pin!= password):
    print("Locked\n")
elif(oldpin == forgetpin):
    print("Device has been success fully opened")
elif(oldpin!=forgetpin):
    print("YOU HAVE ENTERED A WRONG PIN")
else:
    print(Your device has been locked for security reasons.
    our team will contact you as soon as possible on this mobile number +9892724109)


print("Done")

No comments:

Post a Comment