Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CIS 1 1 5 2 0 2 4 SP ch 0 5 _ lab 0 1 Complete the python program below, using onlineGDB. = =

CIS1152024SP ch05_lab01
Complete the python program below, using onlineGDB.
==================================== COPY PROGRAM BELOW THIS LINE ======================
#student name 1/2024 ch05_lab01.py
'''
complete the python program below, using onlineGDB, so it does the following:
1. prompts for how many times the loop is to run
2. accumulates the numbers from 1 to the number of times the loop runs, i.e. if
the loop runs 5 times the total should be 15
3. remember python starts counting at zero (0)
'''
# ================================= initialize accumulator
# ========================================= input data
numTimes=int(input('how many times to you want to run the loop? '))
# ================================== loop and total
for i in range(???):
total =
# ================================= print results
print(f'the total of the numbers from 1 to {numTimes:,d} is {total:,d}')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions