+ 7
Christian Huml ,
it is not quite clear for me what you want to achieve with your code.
maybe this example can help you. we use a range() object starting from 0 upto 1000, generating numbers in a step of 100:
for num in range(0,1000,100):
print(num)
+ 3
You start with 0 as starting value, the condition returns true so it adds 100 to A, 0+100 = 100, prints the value of A, checks the condition again, which returns false this time since value of a is higher than 5. And it exits the loop.
+ 2
G'day Christian Huml congratulations on getting the code to do what you wanted. Do you love the way Python can do some things so much easier than older languages?
Would you do a bit of housekeeping, edit your original post to start with [Solved]?
Have you found the Q&A search bar (it is the magnifying glass icon at the top of the discuss screen)? Did you know you can link other Q&A posts or SoloLearn code bits (use the plus icon)?
https://www.sololearn.com/discuss/1316935/?ref=app
+ 1
https://code.sololearn.com/ccMBR97Pj46J/?ref=app
+ 1
A=0
while (A<=10000):
A += 100
print(A) //prints 100-10000