jeudi 4 novembre 2021

Program running but defaulting to the first ‘if’ [duplicate]

Im trying to get users to choose a Registration of an aircraft that will spit out a weight so i can use the weight in a further calculation but it keeps defaulting to the first option. Can anyone please tell me why? No matter which Reg I pick it prints 11998

print('To locate DOM enter last two letters of AC REG?')
REG = input()
if (REG == 'RA', 'ra'):
    DOM = 11998
    print(DOM)
elif (REG == 'RB','rb'):
    DOM = 12077
    print(DOM)
elif (REG == 'RC', 'rc'):
DOM = 11948
print(DOM)  
elif (REG == 'RD', 'rd'):
    DOM = 11774
    print(DOM)
elif (REG == 'RE', 're'):
    DOM = 11927
    print(DOM)
elif (REG == 'SA', 'sa'):
    DOM = 11904
    print(DOM)

Aucun commentaire:

Enregistrer un commentaire