Calculate the average of the first ten terms sequence

Assignment Help Computer Engineering
Reference no: EM132207498

Answer the following Questions :

a. Write a piece of code that calculates the average of the first 10 terms sequence: {100, 97, 94, 91, 88, ...} using a for loop, and then prints the resulting average.

b. Rewrite the code above so that instead of averaging the first 10 terms, the first N terms are averaged. N is a variable entered by the user. In addition, count the number of even numbers that appear in the sequence.

Reference no: EM132207498

Questions Cloud

Obtain a single digit to generate a numerology report : Write a program that will add the digits of a person's birth date to obtain a single digit to generate a numerology report.
Write a procedure that performs simple encryption : Write a procedure that performs simple encryption by rotating each plaintect byte a varying number of positions in different directions.
Calculate the natural rate of unemployment : Calculate the natural rate of unemployment for this example. Now assume that pet = ?pt-1 and suppose ? is initially equal to 0. Suppose that the rate.
Golden girl of metropolitan government : Krista Acklen was the “golden girl” of a metropolitan government in a large midwestern city.
Calculate the average of the first ten terms sequence : Write a piece of code that calculates the average of the first 10 terms sequence using a for loop, and then prints the resulting average.
What is the purpose of establishing pay ranges : What is the purpose of establishing pay ranges? Be sure to write response in third person narrative.
Create a text file with the users name and store everything : The program must create a text file with the user's name AND store EVERYTHING the user types in it.
What is the cost to consumers of steel : If the labor input is 2 person hours per finished ton of steel, what is the cost to consumers of steel per domestic steel industry job saved by the tariffs?
Incorporated into the final divorce degree : When Roger and Susan divorced, they entered into a property settlement agreement that was incorporated into the final divorce degree.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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