7 Most Engineering Systems Have Redundancy That Is An Engineering System Has More Than Is Required To Accomplish Its 1 (62.44 KiB) Viewed 36 times
7. Most engineering systems have redundancy. That is, an engineering system has more than is required to accomplish its purpose. Consider a nuclear reactor whose temperature is monitored by three sensors. An alarm should go off if any two of the sensor readings disagree. Write a function my_nuke_alarm(S1,S2,S3) where s1, s2, and s3 are the temperature readings for sensor 1, sensor 2, and sensor 3, respectively. The output should be the string 'alarm!' if any two of the temperature readings disagree by strictly more than 10 degrees and 'normal' otherwise. In []: 1 def my_nuke_alarm( 51, 52, 53): 2 # write your function code here 3 4 return response
= = 8. Let Q(x) be the quadratic equation Q(x) = ax? + bx + c for some scalar values a, b, and c. A root of Q(x) is an r such that Q(r) = 0. The two roots of a quadratic equation can be described by the quadratic formula, which is -b + V62 – 4ac 2a A quadratic equation has either two real roots (i.e., b> 4ac), two imaginary roots (i.e., b2 < 4ac), or one root, r = b 2a Write a function my_n_roots(a,b,c), where a, b, and c are the coefficients of the quadratic Q(x), the function should return two values: n_roots and r. n_roots is 2 if Q has two real roots, 1 if Q has one root, -2 if Q has two imaginary roots, and ris an array containing the roots of Q.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!