Determining the function to the sum

Assignment Help Basic Computer Science
Reference no: EM131961486

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

Reference no: EM131961486

Questions Cloud

What are some of the limitations of the article : What are some of the limitations of the article? Using your knowledge of social psychology, what recommendations for future research would you give.
Write a paper about popular music : Write a paper about popular music. Explaining why the time period you chose is crucial to understanding the continuity/change you are exploring.
Test a field for membership in a set of values : After the field name, use the 'in' operator followed by the set items surrounded by braces . Use the following filter tcp.port in {80 53 8080}.
Print the results of the red black tree : Write the C++ program that implement and print the results of the Red Black tree after inserting the following nodes {122, 110, 130, 113,160}?
Determining the function to the sum : Ask the user to enter a number n. function to the sum the following series up to n terms
Discuss your impressions of the current media exposure : PSY 355 Discuss your impressions of the current media exposure with respect to alcohol, tobacco, and other drugs. Sources may come from drama series.
Discuss a number of myths regarding sleeping behaviors : PSY 300 The textbook discusses a number of myths regarding sleeping behaviors and sleep disorders. Had you heard some of these myths?
Explain the pros and cons of such a law : POLS101 Explain your position on whether you believe the United States should make voting a mandatory law. Explain the pros and cons of such a law.
Explain the purpose of the field named : Explain the purpose of the field named "id." Why do you not have to include it in an insert statements? How would change the incrementing value to a number grea

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