0

I am making a small quiz that has different difficulties, when doing my easy section my if statement always prints incorrect even with the correct answer - i am still new to python it might be a very easy thing to solve How can I know if this is a duplicate if i don't know what is wrong here is my code

def easy():
    score = 0
    print("Welcome to the easy section!")
    print("****************************")
    print("Random Access Memory(1)")
    print("Radical Amazonian Mandem(2)")

    qe1 = input("What does RAM stand for?:    ")

    if qe1 == 1:
        score = score + 1
        print("Well done, next question:")

    if qe1 != 1:
          print("Incorrect, next question:")

    else:



easy()
Kian L
  • 73
  • 8

1 Answers1

0

input function return a string, you should cast it to int:

    qe1 = int(input("What does RAM stand for?:    "))
Ohad Eytan
  • 8,114
  • 1
  • 22
  • 31