Question: Hi I'm having a hard time with this question. Thank you #1a: Insert the missing line of code so that the following adds the integers
Hi I'm having a hard time with this question.
Thank you
#1a: Insert the missing line of code so that the following adds the integers from 1 to 10, inclusive.
| x = 0 top = 10 y = 1 while y <= top: x = x + y # insert the missing line here and change this to a descriptive comment |
#1b: Explain the role of variable x in the algorithm above, and suggest a more meaningful, more descriptive name for that variable.
#1c: Explain the role of variable y in the algorithm above, and suggest a more meaningful, more descriptive name for that variable.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
