My code is not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

My code is not working

Hi, I wrote a code that checks if the pin entered is correct or not. But i doesnt run correctly when the pincode entered is correct. Can you help me? pin = 1234 pin_input =input(int('please enter your pin : ')) for i in range (2) : if pin_input == pin : print('your pin is correct') else: print('your pin is incorrect, please enter again') pin_input = input('please enter your pin : ') print('your card has been blocked')

9th Jan 2022, 11:13 PM
G?k?e T?remen
2 Answers
+ 2
Heyyy, pin = 1234 pin_input = int(input('please enter your pin : ')) <--- int goes on outside <---- for i in range (2) : if pin_input == pin : print('your pin is correct') else: print('your pin is incorrect, please enter again') pin_input = input('please enter your pin : ') print('your card has been blocked')
10th Jan 2022, 12:06 AM
MyNameIsMutable
MyNameIsMutable - avatar
+ 1
Oh thank you very much now i see 😌
10th Jan 2022, 12:13 AM
G?k?e T?remen