Why doesnt this work?

Question:
Why Doesn’t this work?

Repl link:
https://replit.com/@HeartOfBedrock/JitteryRashTrapezoids?v=1

code snippet:
import math
a=23
b = input("Enter a number:")
if b==a : print("Correct!")
else: print("Wrong! Try again!")

you need to convert b to integer or it will compare the wrong value of b. Of course would be great if you check also if the unput value is a number to manage errors.

4 Likes