mardi 28 septembre 2021

I want to use S as an input for the variable A but S is not defined when i run the program in Pycharm [closed]

"""

A = str(input("Social Status: "))

B = int(input("Age: "))

if A == S:
    print("Qualified!")
elif B > 16 and B < 25:
    print("Qualified!")
else:
    print("Sorry! Not Qualified")

"""

#output

Social Status: S

Age: 12

Traceback (most recent call last):

line 4, in #

if A == S:

NameError: name 'S' is not defined

Process finished with exit code 1

Aucun commentaire:

Enregistrer un commentaire