+ 2
Code works not as intendet
I wanted to write a code that choose a random number between 100-200 but it also choose numbers under 100. https://code.sololearn.com/c3jVCMcmfJ2T/?ref=app
5 Respostas
+ 7
Got the problem. You used the variable x again in the for loop (line 4):
for x in range (1):
Therefore the random number range will be from 0 to 200.
You need to just change x into z or some other variable (not y either).
+ 3
I don't think you need to initialize x and y. Just type the values directly inside the parentheses.
+ 3
Lol, I just use all the variable inside the method to make it more complex. That's the pro's way XD
+ 2
Thank you guys.
Yeah, at first i just typed it directly inside but i wanted to make it a bit more "complex".
+ 2
No need to make the code complex when you can keep it simple ;)