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.:- M92800897
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Solution must be recursive you are not allowed to use loops

Solution must be recursive. You are not allowed to use loops, or use the Python "in" operator. PYTHON Write a function called first. It is passed a parameter x, that may or may not be a list; if is x is a list it may con ...

1 a router operates at which osi layer application

1. A router operates at which OSI layer? Application Presentation Session Transport Network Data Link Phsical 2. Suppose application data of size X bytes is transmitted from system A to system B via the OSI layers and th ...

Write a program that uses a function that returns a number

Write a program that uses a function that returns a number between 1 and 6. Use this function to simulate the roll of a die. Allow the user to specify the number of trials and then tabulate that number of rolls of two di ...

Across the nine cities in multilevel multivariate analysis

Across the nine cities, in multilevel, multivariate analysis, controlling for income inequality (GINI coefficient), percent living in poverty and percent Non-Hispanic Black population, the ZIP code level overall HIV diag ...

Explain that when an unauthorized individual gains access

Explain that when an unauthorized individual gains access to the information an organization trying to protect, that act is categorized as a deliberate act of espionage or trespass.

The marginal revenue and marginal cost functions for a

The marginal revenue and marginal cost functions for a monopolist firm that mines diamonds are given by:

Requirementsin this assignment you will implement a

Requirements In this assignment, you will implement a lightweight version of an ArrayList class. You may refer to the Java code and documentation for guidance, but you must write the implementation yourself. Additionally ...

Eleven people have eleven different favorite numbers from 2

Eleven people have eleven different favorite numbers from 2 to 12. They all agree to participate in a 10,000-roll dice game where they bet $1 on their favorite number for each roll of two standard (fair) dice. A donor ki ...

Question suppose you wanted to delete the trash of all

Question : Suppose you wanted to delete the trash of all users just tonight at 11pm using the just created /root/deleteTrash.bash script. Assuming that the deleteTrash.bsh script which deletes the trash of all users exis ...

Question write a 1-2 page paper in apa format describe how

Question: Write a 1-2 page paper in APA format. Describe how Windows Active Directory enhances security in your organization. What, if anything, could be improved? This project is due On Saturday morning 9/22. The respon ...

  • 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