0

Can anyone tell me what's wrong with this code

https://code.sololearn.com/cavOP25derHH/?ref=app

12th May 2019, 6:45 PM
Fjjdjdhdufj
11 Antworten
+ 4
Werg Serium Btw: You are allowed to ignore questions. ;)
12th May 2019, 8:08 PM
Denise Roßberg
Denise Roßberg - avatar
+ 3
Werg Serium For me it is simple: * he started yesterday * it is his first code (and I guess his first language) * if you think it is a stupid question: just ignore it * using "f*cking" is against the sololearn rules
12th May 2019, 8:46 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
1. Use int() to convert input to an integer. 2. Two indentation errors (line 2 and 4). num = int(input("Enter a number: ")) if num <= 5: print("YOU WIN") else: print("LOSER")
12th May 2019, 6:50 PM
Diego
Diego - avatar
+ 2
Werg Serium There's no need to swear.
12th May 2019, 6:54 PM
Diego
Diego - avatar
+ 2
Really it's fine I just started learning yesterday so this is the first thing I've done outside of print()
12th May 2019, 7:03 PM
Fjjdjdhdufj
+ 1
Fjjdjdhdufj keep it up! I wish you much fun. And if you have another question, don't hesitate to come back here; we are here to help each other improve :)
12th May 2019, 8:01 PM
Hiro
Hiro - avatar
0
First you need to ident the code, second it's if condition: and else:, third it's int(input("something")).
12th May 2019, 6:57 PM
Werg Serium
Werg Serium - avatar
0
Sorry for my anger Diego
12th May 2019, 6:59 PM
Werg Serium
Werg Serium - avatar
0
Yes i am allowed to do that..., but if there is a programming language like python that "simplified" so many things and also you don't need to do ; or {}, so there must be a price in the level of sintax. You cannot just write code with no rules of sintax, there will be always sintax... If one programming language is easy to learn doesn't mean that you can code with no rules.
12th May 2019, 8:21 PM
Werg Serium
Werg Serium - avatar
0
Yes i know my apologies.
12th May 2019, 8:48 PM
Werg Serium
Werg Serium - avatar
- 2
Diego that's python, so no excuses. It's not c or java or c#
12th May 2019, 6:59 PM
Werg Serium
Werg Serium - avatar