0
Whats wrong with this code?
I tryed out something while learning and I don't rly understand what the mistake is... Can someone help me please? Thank you guys https://code.sololearn.com/czq99i9cu1A5/?ref=app
4 Answers
+ 2
+ 7
The mistake seems to be that you added indentation on lines 4 and 5 when you didn't need to have an indent there. Getting rid of the space before those 2 lines should allow it to run without problem
+ 1
num = int(input('Number:'))
if num < 5:
print('Less than 5')
if num > 5:
print('Bigger than 5')
There is indentation problem, if you are using the way are doing, it means that the second if is nested in the first if so only if both conditions are correct then only it will execute, also you can use an else instead of second if
0
I tried your code and wrote "3" as input when asked. It worked properly