Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please add a loop to the lines of code above to go through all of the y axis and find the lowest number

image text in transcribedCan you please add a loop to the lines of code above to go through all of the y axis and find the lowest number between 0-100?

Thank you!

import numpy as np import matplotlib.pyplot as plt omatplotlib inline f=float(input(EnterFlowRate)) \#did in class\# y=np.linspace(0,100,10000) def calc_Q (y) : return 1.987(8y)(5/3)/((8+2y)(2/3)) Q= calc_Q (y) plt.axhline (100) pltplot(y,Q,k) idx=npargwhere(npdiff(npsign(Qf))) plt.show ( ) \#loop through all y and find lowest number between low and 100 \#x will give you the lowest and should be root F.nter F1 nint Rate

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Implementing Ai And Machine Learning For Business Optimization

Authors: Robert K Wiley

1st Edition

B0CPQJW72N, 979-8870675855

More Books

Students also viewed these Databases questions

Question

a. What are the least squares estimates of 0 and 1?

Answered: 1 week ago