Write a re-usable program to calculate various averages in


Project I

Project: Using a program environment (i. e. Raptor, Basic, C, Python). Choose one of the problems below and using the topic covered in Chapter 3 of the text (Robot Programming: A Guide to Programming Autonomous Robots), do the following:

i. Draw the flowchart (pseudocode)
ii. Write the program
iii. Submit a report.

1. A biologist determines that the approximate number, Number, or bacteria present in a culture after Time (in days) is given by the following formula:

Number = BacteriaPresent * 2(Time/10)

Where BacteriaPresent is the number present at the beginning of the observation period. Let the user input BacteriaPresent, the number of bacteria present at the beginning. Then compute the number of bacteria in the culture after each day for the first 10 days. Do this in a loop so the user can see the results in a table. The output table should have headings for day and Number of Bacteria Present (on that day).

2. Suppose a pair of dice is rolled and its sum is recorded. For example, if the first die comes up 4 and the second comes up 8, we record the value 12. Write a program to generate what outcomes are most likely. Identify if it is more likely that the sum of a roll of a pair of dice will be 7 or 11.

This can be answered by simulating an experiment with a program that uses random numbers. For each roll of the dice, we need to generate two random numbers - one for each die - in the range from 1 to 6. Then we add these numbers and keep track of the number of times the sum is 7 or 11. If we roll the dice (generate a pair of random numbers) thousands of times, the sum (7 or 11) with the larger count is presumably the one that is more likely to occur.

3. Write a re-usable program to calculate various averages in your classes. It doesn't matter if you have 3 exams or 33 exams. The program should compute the computer the average as such:

ExamAverage = SumGrades/CountGrades

The output should show the number of grades entered and the average of the grades.

Request for Solution File

Ask an Expert for Answer!!
Dissertation: Write a re-usable program to calculate various averages in
Reference No:- TGS01660620

Expected delivery within 24 Hours