+ 1

Why is it vice versa in my code?? (Done)

https://code.sololearn.com/cu1QBqBJQ7Um/?ref=app I wanted to make only numerical pin codes But now my cod returns only text pin codes… Why?? pin = input("Enter four numbers: ") try: x = list(pin) if len(x) == 4: print("PIN code is created") else: print("Use only four numbers") except: print("Please use only numbers")

23rd Sep 2022, 10:46 AM
Inna
2 Respuestas
0
You just need to write: pin = int(input("Enter four numbers: "))
23rd Sep 2022, 10:49 AM
Tomás Ribeiro
Tomás Ribeiro - avatar
0
Done. I think…
23rd Sep 2022, 12:06 PM
Inna