+ 1
Why does this not work properly?
So i saw the code of the day and wanted to try something simular but i just cant get it to work. And i cant understand why it does not work can someone explain it to me? Pin = input("Enter your pin please: ") count = 0 while count != Pin: count +=1 if count == Pin: print("Your pin is:", count) break it just goes into an infinite loop of counting.
2 Answers
+ 5
In the first line, write
Pin = int(input("Enter your pin please: "))
as Pin is an integer đ
+ 2
replace Pin = input("Enter your pin please: ")
with Pin = int(input("Enter your pin please: ")
)