Write a program to determine the length of bursts of zero

Assignment Help Basic Computer Science
Reference no: EM132184081

Write a program to determine the length of bursts of zero's in a list of N numbers stored in an List. The program should record the length of the bursts of zero's in another List. The program should then print the lengths of the bursts.

Using this second List with the lengths of the bursts, it should also compute and print the following: the average length of the bursts, the minimum burst length, the maximum burst length, and the total number of zeros (the sum of the burst lengths). 

Your program should:

1. Prompt the user for the size of the list (N). Then it should prompt the user to enter N numbers and store them into an list called burstList. Note, you should specify the maximum size of N allowed (based on how large you declare your List).

2. Given N and list, your program should compute the lengths of the bursts of zeros and store them in an list called BurstLengths. After computing and storing the burst lengths you should terminate your BurstLengths list with a sentinel (-1). Use a for loop in this step.

3. Given the BurstLengths List with a sentinel (-1), use a while loop to print the list of burst lengths. Format this nicely in a table with headings.

4. Given the BurstLengths List with a sentinel (-1), compute and then print the following information:

a. Average burst length

b. Minimum burst length

c. Maximum burst length

d. Total number of zeros

Reference no: EM132184081

Questions Cloud

Focusing on host intrusion detection system : Focusing on Host Intrusion Detection System, Intrusion Prevention Systems (HIDS) or AntiVirus Systems.
Improving old and outdated equipment : What a improved skilled work force will help with are Improving a old and outdated equipment, Improve the lack of innovative design
What are the pros and cons of this strategy : Executive Leadership: Industry knowledge and experience, vision about where the industry is heading, and strategy execution.
Researching and monitoring the company macroenvironment : Which exclusively publishes textbooks for Colorado public schools, you are responsible for researching and monitoring the company's macroenvironment
Write a program to determine the length of bursts of zero : Write a program to determine the length of bursts of zero's in a list of N numbers stored in an List. The program should record the length of the bursts of zero
Three skills connect with different levels of management : Define technical skills, human skills, and conceptual skills. How do these three skills connect with the different levels of management?
Was it technology that drove this change or was it business : Information technology has changed business as companies compete globally and are pressured to provide quality, speed, and customer service.
Identify business leader who you admire in your community : Not every great business leader is a big talker, but most are excellent communicators. Identify a business leader who you admire in your community.
Define a function datetonum : Define a function dateToNum(..) which receives as parameter a string representing a date in the format:

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Accounts receivable balance indicates

As a result of these transactions the change in the accounts receivable balance indicates a

  Summarize your experience with web hosting

Summarize your experience with web hosting, and Summarize your experience in a help desk and/or call center environment.

  What were the sharks responses

Go to google.com (Links to an external site.), abc.com (Links to an external site.), or any other streaming site you have access to. Find episodes of the show "Shark Tank". Watch a few episodes and then choose your favorite 3 (THREE) pitches and a..

  Use to monitor success and indicate a need for modification

What method would you use to monitor success and indicate a need for modification in a cloud computing environment?Needs to be 250 words and APA format and at least one reference with in-text citations.

  New report of shipped orders

The Marketing Department has requested a new report of shipped orders for which the order was placed on either a Saturday or a Sunday. Write a query which displays the order id, order date, shipped date, along with a calculated column labeled "Ord..

  Discuss the confidence level the p-value and the decision

A 90% confidence interval estimated the mean sodium content for this kind of hot dog at 317.2 to 326.8 mg. Explain how these two results are consistent. Your explanation should discuss the confidence level, the P-value, and the decision.

  The cloud service to become operational again

Over the past 3 years, a cloud service has been unavailable for a total of 36 hours, primarily due to a denial of service attacks. Additionally, the physical server hosting the cloud service crashed once. It took the cloud provider 4 days to replace ..

  What are examples of data analysis

What are examples of data analysis (business intelligence) that people in different roles might need to do?

  Contribution income statement

Beginning inventory is zero. How much will the company report as total variable product costs on its 2014 contribution income statement?

  Program that asks the user for the name of a file

Write a program that asks the user for the name of a file. The program should display the last 10 lines of the file on the screen (the "tail" of the file). If the file has fewer than 10 lines, the entire file should be displayed, with a message in..

  Advertising regulations on the internet

Read at least three articles that are no more than 12 months old. Apply the content from the articles to advertising regulations on the Internet.

  Postfast interface into root-inconsistent

What is the name of the security feature on a Cisco switch that will place a postfast interface into root-inconsistent state as long as that interface receives?

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