Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Assignment 2, you must create a for-loop that sums up numbers from 1 through (including) 100. Once you have the sum, divide by 100

image text in transcribed
image text in transcribed
In Assignment 2, you must create a for-loop that sums up numbers from 1 through (including) 100. Once you have the sum, divide by 100 to get the average of those numbers. Then repeat this idea from 1 through 1,000,000 (1 million). The base code fife has been given. Good luck! # 1. - # Set up variables for later myAvg = 0 mySum - 0 # 2. # Calculate sum of 1 through 100 # 3. - # Divide to get the average of numbers 1 through 100 # Calculate sum of 1 through 1,000,000 # 5. # Divide to get the Average of numbers 1 through 1,000,000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions