Question: in python : Set value i to 0. Set value sum to 0. While the value i is less than 4, do the following. Otherwise,
in python :
- Set value i to 0.
- Set value sum to 0.
- While the value i is less than 4, do the following. Otherwise, goto Step 4.
- a) Ask the user to input a value n.
- b) Add n to sum.
- c) Add 1 to i.
- d) Repeat Step 3 with the updated values.
- Output the value of sum.
Create a table tracing the algorithm through each step. Assume the user enters 1, 2, 3, and so on...
table:
|
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
