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
8 Antworten
+ 2
=> , =< aren't any operators use >=, <= respectively.
guess you are doing this.
or for further help attach your code.
+ 1
If you dont post some code its hard help you
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
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á")
0
ok, thanks
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)
0
ok
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: