Question

Part A only please.

Problem 2 a) If we simplistically assume that the chemical spills shape is a cylinder, write a function that calculates the

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ans 2a) Algorithm for calcaulating the volume of the spill

A) Initialise the volume of spill to 0.

B) For each time time stamp do the steps 1-5

1. Input the two extreme points of the base of the spill(x1,y1) and (x2 y2) such that the line connecting this 2 points passes through the centre of the radius.

2. Input coordinate (x3,y3) of a point on the top of the cylindrical spill vertically above the point (x2,y2)

3. now radius =(distance b/w points (x1,y1) and (x2,y2))

radius =

4. height = distance between (x2,y2) and (x3,y3) = y3-y2.

5. volume of spill =volume of spill + (22/7.0)*radius*radius*height

C) Print the volume of spill

Add a comment
Know the answer?
Add Answer to:
Part A only please. Problem 2 a) If we simplistically assume that the chemical spill's shape...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • only do part (c) **please explain how to solve M^-2 The Haber process is used to...

    only do part (c) **please explain how to solve M^-2 The Haber process is used to make ammonia, N2(g) + 3H2(g) = 2NH3(g) a) Write down the condition for equilibrium for this reaction in terms of the concentrations of reactants and products. At 298 K, this reaction has AH° = -46 kJ mol"', and AS° = -100 J K-mol?. Assume that AH° and ASº are independent of temperature. At what temperature does AGº vanish, i.e. AG° = 0? (c) Under...

  • please show work!!!! Part 2, Instructions: Read the information below and use this to answer question 9-11 on pa...

    please show work!!!! Part 2, Instructions: Read the information below and use this to answer question 9-11 on page 8 Section 9. OVERTIME Pursuant to the provisions of the Fair Labor Standards Act, non-exempt employees shall be paid overtime at their appropriate rate of not less than one and one-half(1 %) times their rate of pay for each hour worked in a work period in excess of the maximum hours allowable, which are applicable to the type of employment in...

  • YOU ONLY NEED TO ANSWER QUESTIONS 1,5, & 8 AND…in addition to answering each question, state 2 other questions aft...

    YOU ONLY NEED TO ANSWER QUESTIONS 1,5, & 8 AND…in addition to answering each question, state 2 other questions after each of these that might be asked of you by a health professional that would call on you to do the same calculation, or know the same concept. Give answer for these, and show all work. 174 Chapter LEARNING QUESTIONS (1) Gentamicin has an average elimination half- life of approximately 2 hours and an apparent volume of distribution of 20%...

  • Continuing Payroll Problem, 2A: Chapter 2 Kipley Company is a small manufacturing firm located in Pittsburgh,...

    Continuing Payroll Problem, 2A: Chapter 2 Kipley Company is a small manufacturing firm located in Pittsburgh, Pennsylvania. The company has a workforce of both hourly and salaried employees. Each employee is paid for hours actually worked during each week, with the time worked being recorded in quarter-hour increments. The standard workweek consists of 40 hours, with all employees being paid time and one-half for any hours worked beyond the 40 regular hours. Wages are paid every Friday, with one week's...

  • Situation (note: Problem 2 is not linked with Problem 1): Assuming the design flow rate of...

    Situation (note: Problem 2 is not linked with Problem 1): Assuming the design flow rate of raw wastewater to be treated is 20 MGD in the design year, the dissolved BODs is 380 mg/L, and SS is 360 mg/L. The wastewater generated by the sludge treatment process is about 4 MGD with the dissolved BODs being 1800 mg/L, and SS being 1200 mg/L, and will be returned to the wet well in the pumping station at the beginning of the...

  • USE THE DATA LISTED IN THE EXCEL BELOW PLEASE THANK YOU !! [5] Q2. Problem 3.14....

    USE THE DATA LISTED IN THE EXCEL BELOW PLEASE THANK YOU !! [5] Q2. Problem 3.14. Refer to Plastic hardness Problem 1.22. Use the data modified for this problem from Datasets for Assignment_3. (a) Perform the F test to determine whether or not there is lack of fit of a linear regression function; use a = .01. State the alternatives, decision rule, and conclusion. (b) Is there any advantage of having an equal number of replications at each of the...

  • 10. Write a one-page summary of the attached paper? INTRODUCTION Many problems can develop in activated...

    10. Write a one-page summary of the attached paper? INTRODUCTION Many problems can develop in activated sludge operation that adversely affect effluent quality with origins in the engineering, hydraulic and microbiological components of the process. The real "heart" of the activated sludge system is the development and maintenance of a mixed microbial culture (activated sludge) that treats wastewater and which can be managed. One definition of a wastewater treatment plant operator is a "bug farmer", one who controls the aeration...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT