Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Ask the user to enter a number n. function to the sum the following series up to n terms

0 + 4 + 16 + 36 .... (squares of even numbers)

Note: Your code must use a function which takes n as input and produces the sum as output. Just outputting the result will get you half points.

Sample Output 1:

Please enter n: 2

4

Sample Output 2:

Please enter n: 3

20

Q1b. 20 points mixing lists:

Ask the user to input two lists of equal size. new list which interleaves the two lists by taking 3 numbers from the first list and then 3 numbers from the second list. Output the interleaved list. If the lists' lengths are not a multiple of 3 just append the remaining numbers from list one followed by the remaining numbers from list 2 at the end.

Sample Output 1:

Please enter list 1: 1 2 3 4 5 6

Please enter list 2: 7 8 9 10 11 12

The combined list is 1 2 3 7 8 9 4 5 6 10 11 12

Sample Output 2:

Please enter list 1: 1 2 3 7

Please enter list 2: 4 5 6 8

The combined list is 1 2 3 4 5 6 7 8

Sample Output 2:

Please enter list 1: 1 2 4 0 0

Please enter list 2: 13 3 5 7 7

The combined list is 1 2 4 13 3 5 0 0 7 7

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92799143
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Find minimal dfas for the following languages in each case

Find minimal dfa's for the following languages. In each case prove that the result is minimal. (1) L = {a n bm> :n≥2,m≥1}. (2)L = {a n :n ≥ 0,n ≠ 3} (3) L = {a n :n mod 3 = 0}∪{a n : n mod 5 = 1}

Assume nebraska and virginia each have 100 acres of

Assume Nebraska and Virginia each have 100 acres of farmland. The following table gives hypothetical figures for yield per acre in the two states:                                  Nebraska               Virginia   Wheat  ...

Discuss the importance of using an access control model in

Discuss the importance of using an access control model in determining how employees in an organization should gain access to resources.

Question you need to research the topic and discuss the

Question: You need to research the topic and discuss the topic in at 400 words with references. Then, . reference will not count as a discussion. What would be the impact of predictive modeling on healthcare and medicine ...

Calculate the present worth of all costs for a newly

Calculate the present worth of all costs for a newly acquired machine with an initial cost of $30,000, no trade-in value, a life of 15 years, and an annual operating cost of $13,000 for the first 4 years, increasing by 1 ...

What is the various security architectures which provides

What is the various security architectures. Which provides the best balance between simplicity and security? Justify your answer.

Question in a sliding window protocol assume that the

Question : In a Sliding Window Protocol, assume that the senders and receivers window sizes are 3 packets each and a total of 6 packets are sent numbered 1-6. Draw time line diagrams corresponding to each of the followin ...

As the school year begins what trends are taking place with

As the school year begins, what trends are taking place with Educational Technology in schools?

For a small computer design with 8-instructions suppose the

For a small computer design with 8-instructions. Suppose the processor is modified such that it can is 21-bit processor and can address 2^16 Memory locations: 1. What is the word size? 2. How that will affect the size of ...

Question you are required to sort a file containing

Question : You are required to sort a file containing integers between 0 and 999999. You cannot afford to use one million pigeon-holes, so you decide instead to use one thousand pigeon-holes numbered from 0 to 999. You b ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As