Question: python (15 2) Write a while loop to add the numbers from 1 to 20. Write the sum to the screen as follows: The sum

(15 2) Write a while loop to add the numbers from 1 to 20. Write the sum to the screen as follows: The sum of the integers 1 - 20 is: 1 + 2 + 3 ... 20 = 190 Coding Steps: 1. Create accumulators to hold sum of numbers and count for loop. count = 0# nbr of times in the loop sumTotal = 0 # total of nbrs 2. Print the header print("The sum of the integers 1-20 is:") print(" \t") # It to create a tab character 3. Code a while loop going from 1 to 20. Add to your accumulators - count and sumTotal. Finally print the value of count we are currently processing. while
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
