0
Can anyone tell me what's wrong with this code
11 Antworten
+ 4
Werg Serium
Btw: You are allowed to ignore questions. ;)
+ 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
+ 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")
+ 2
Werg Serium There's no need to swear.
+ 2
Really it's fine I just started learning yesterday so this is the first thing I've done outside of print()
+ 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 :)
0
First you need to ident the code, second it's if condition: and else:, third it's int(input("something")).
0
Sorry for my anger Diego
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.
0
Yes i know my apologies.
- 2
Diego that's python, so no excuses. It's not c or java or c#