0

When i use (on python) sentence with =< or >= the program drop me an error?

i been trying to disolve this error but i cant

1st Jul 2018, 3:05 PM
3nzo
3nzo - avatar
8 Antworten
+ 2
=> , =< aren't any operators use >=, <= respectively. guess you are doing this. or for further help attach your code.
1st Jul 2018, 3:17 PM
Nikhil Dhama
Nikhil Dhama - avatar
+ 1
If you dont post some code its hard help you
1st Jul 2018, 3:11 PM
KrOW
KrOW - avatar
0
its used in statements that require it to be true, for example; while loops and if statements. you possibly missing the ":" at the end of line? copy your code's relevant part here for faster help
1st Jul 2018, 3:13 PM
Markus Kaleton
Markus Kaleton - avatar
0
print ("ingresa tu nombre") saludo = "Hola" nombre = input () print(saludo +" "+ nombre) print ("ingresa tu edad") edad = input() if edad == (int(18)): print("eres mayor de edad") else: print("eres menor de edad") print("ingresar contraseña") contraseña = input() if contraseña == ("contraseña"): print("contraseña correcta") print("puede continuar ejecutando el codigo") else: print("contraseña incorrecta") print("el programa se cerrará")
1st Jul 2018, 3:15 PM
3nzo
3nzo - avatar
0
ok, thanks
1st Jul 2018, 3:18 PM
3nzo
3nzo - avatar
0
Just for optimize your help, next time post a link to your code (save it on 'Code Playground' section, copy his URL and past it in comment)
1st Jul 2018, 4:10 PM
KrOW
KrOW - avatar
0
ok
1st Jul 2018, 4:11 PM
3nzo
3nzo - avatar
0
dont enclose the values into ( ) if contrasena == "contrasena": and input will be a string by default so you have to do edad = int(input()) if edad == 18:
1st Jul 2018, 4:20 PM
Markus Kaleton
Markus Kaleton - avatar