6 Replies
Your code consists out of 3 basic parts. A for loop, a if condition and the print statement.
Do you understand what each of those is doing exactly?
You could add an
else
Yes, To start with 1 and ends with 200, next to each number that is divisible by 8, print "Good"
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Thanks, it worked
Ok great!
Now you want to print each number.
The naive way would be to just add a new print statement somewhere in the loop, but outside the if.
If you do that you will notice a new problem. Your divisible by 8 once will be printed twice right?
To solve that you can use an else