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

Difference in mean cpu time required for the two computers

Do the data provide sufficient evidence to indicate a difference in mean CPU times required for the two computers to complete a job? Test using α=.05. Give bounds for the as

Perform a hierarchical clustering

Perform a hierarchical clustering of the one-dimensional set of points 1, 4, 9, 16, 25, 36, 49, 64, 81, assuming clusters are represented by their centroid (average), and at

How many length-(k - 1) subsets do we need to check in

Let c be a candidate itemset in Ck generated by the Apriori algorithm. How many length-(k - 1) subsets do we need to check in the prune step? Per your previous answer, can y

Write a parameterizable model of a voltage source

Write a parameterizable model of a voltage source that generates a ramp. The parameters should be initial voltage, final voltage, delay before the ramp, and rise (or fall) t

Four cloud computing service models

In your current business environment, or one you were in at one time, which of the four cloud computing service models do you think might be good for that company to conside

Modify the previous program to get its input from a file

Write a program that accepts a sequence of average daily temps and computes the running total of cooling and heating degree-days. The program should print these two totals a

Choose one usability concept

Choose ONE usability concept and describe how you think that particular concept is important to your particular interface evaluation. Don't forget to focus on the readings to

Create a gantt chart that is based on the details

Create a work plan listing the tasks that will need to be completed to meet the system's requirements - Create a Gantt chart that is based on the details of your work plan. Yo

Reviews

Write a Review

 
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