Program that finds the average of a series of numbers

Assignment Help Basic Computer Science
Reference no: EM131302411

1. Write a program that finds the average of a series of numbers entered by the user. As in the previous problem, the program will first ask the user how many numbers there are. Note: the average should always be a float, even if the user inputs are all ints.

2. Write a program that approximates the value of π by summing the terms of this series: 4/1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + . . . The program should prompt the user for n, the number of terms to sum, and then output the sum of the first n terms of this series. Have your program subtract the approximation from the value of math.pi to see how accurate it is.

Reference no: EM131302411

Questions Cloud

Is it possible for packet to delivered to wrong destination : Assuming no malfunction in any of the station or nodes of a network, Is it possible for a packet to be delivered to the wrong destination?
Construct six reasons for and six reasons against the topic : Construct at least six reasons for and six reasons against the topic. Rank the reasons in terms of strength and effectiveness. Explain why you identified each argument as either strong or weak in each category.
What is the rate of return on the fund : Consider a no-load mutual fund with 200 million in assets and 10 million shares at the start of the year and with 250 million in assets and 11 million shares at the end of the year. During the year investors have recieved income distributions of $2 p..
Gross profit and ending inventory : The Bradley Corporation produces a product with the following costs as of July 1, 2014: Material $ 4 per unit Labor 4 per unit Overhead 2 per unit Beginning inventory at these costs on July 1 was 4,250 units. What is the value of ending inventory?
Program that finds the average of a series of numbers : Write a program that finds the average of a series of numbers entered by the user. As in the previous problem, the program will first ask the user how many numbers there are. Note: the average should always be a float, even if the user inputs are ..
Percent-of-sales method : The Manning Company has financial statements as shown next, which are representative of the company’s historical average. The firm is expecting a 25 percent increase in sales next year, and management is concerned about the company’s need for externa..
Growth and financing : Growth and financing [LO4] Eli Lilly is very excited because sales for his nursery and plant company are expected to double from $570,000 to $1,140,000 next year. Eli notes that net assets (Assets − Liabilities) will remain at 50 percent of sales. Do..
Define a best fit pmlc model for this project : Define a best fit PMLC model for this project.- Establish requirements based on the information providedbelow.- Provide aWBS.
Calculate the volume and surface area of a sphere : Write a program to calculate the volume and surface area of a sphere from its radius, given as input. Here are some formulas

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd