![]() ![]() |
| |||||||||
| This page removed for FERPA compliance | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| When it says print r, it is referring it a variable, not the letter r. If it wanted to print the letter r, it would read print "r" Also, how many times will value be decremented in the loop? I think it's REMOVED than just once. Student1594 |
| Are you printing value inside the for loop? Student1594 |
| The i represents each number in the range as you run through the loop. So for i in range(1,3) i will be 1, the first time the loop runs, and 2 the second time it runs. Student1594 |
| The value = value - 1 is written inside the for loop so it runs as many times as the for loop runs, so on the first iteration (iteration means one step of the loop) the value decreases from 10 to 9, and then on the second iteration value starts at 9, and then is decreased by one to 8 and so on until the loop finishes. Student1594 |
| Also, there seems to be a lack of agreement amongst the posts as th whether everything is printed on one line, or whether there are line breaks in between each print... so which is it? Student1594 |
| Correct Student1594 |