Question

Predict the outcome of each line: F1 F0 while i<10: i+=1 j+=2*2 print(i) #Line 1 print() # Line 2

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Explanation:
----------------
Iteration: 1
   i is changed from 1 to 2
   j is changed from 0 to 2.2
   And then i and j values are printed on separate lines
Iteration: 2
   i is changed from 2 to 3
   j is changed from 2.2 to 4.4
   And then i and j values are printed on separate lines
Iteration: 3
   i is changed from 3 to 4
   j is changed from 4.4 to 6.6
   And then i and j values are printed on separate lines
Iteration: 4
   i is changed from 4 to 5
   j is changed from 6.6 to 8.8
   And then i and j values are printed on separate lines
Iteration: 5
   i is changed from 5 to 6
   j is changed from 8.8 to 11.0
   And then i and j values are printed on separate lines
Iteration: 6
   i is changed from 6 to 7
   j is changed from 11.0 to 13.2
   And then i and j values are printed on separate lines
Iteration: 7
   i is changed from 7 to 8
   j is changed from 13.2 to 15.4
   And then i and j values are printed on separate lines
Iteration: 8
   i is changed from 8 to 9
   j is changed from 15.4 to 17.6
   And then i and j values are printed on separate lines
Iteration: 9
   i is changed from 9 to 10
   j is changed from 17.6 to 19.8
   And then i and j values are printed on separate lines


Output:
--------
2
2.2
3
4.4
4
6.6
5
8.8
6
11.0
7
13.2
8
15.4
9
17.6
10
19.8
Add a comment
Know the answer?
Add Answer to:
Predict the outcome of each line: F1 F0 while i<10: i+=1 j+=2*2 print(i) #Line 1 print()...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT