+ 8
Can anyone explain what's going on this python code??
how is this output possible??? can anyone explain??? for n in range(2,10): for x in range(2,n): if n%x==0: break else: print(n,end=' ') output is 2357 but how??
2 Réponses
+ 3
Look at this code. I have added a few print statements so that you can see very clearly what is going on at each step. I often use print() to debug... If you look out the ouput and still do not understand what is going on let me know ☺
https://code.sololearn.com/c3EvVv8F7d16/?ref=app
+ 9
@cyk
it's really helpful! thanks for your help