+ 3
What have i done wrong? Cant you write a == i
8 Réponses
+ 3
Kristi Teneqexhi
if a <=1:
a *= -1
Input 1 --> a = -1
I think you want to avoid negative numbers.
if a < 0:
a* = -1
0 is also not working, so you have to decide what you want to do with it. Maybe this?
if a == 0:
a = 1
+ 6
Indentation matters in Python. Try indenting line 12 and 13 to group them under the if block.
+ 4
if a == i:
//print...
+ 4
It says time limit exceeded
+ 4
Denise Roßberg i know it is pointless but i just wanted to practise cause you can simply write
Print ("your number is:", a)
After some changes it is finally done
https://code.sololearn.com/cYKe4Hd7tVWB/?ref=app
+ 3
Kristi Teneqexhi I know. But a code for practising does not need any sense ;)
+ 2
Oh ok
0
no these are two different variables