Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use Jupyter Notebook Coding ONLY. DO NOT use Matlab. P1. The volume of liquid, V, in a partially filled, horizontal, cylindrical tank of radius

Please use Jupyter Notebook Coding ONLY. DO NOT use Matlab.
image text in transcribed
image text in transcribed
image text in transcribed
P1. The volume of liquid, V, in a partially filled, horizontal, cylindrical tank of radius r and length L is related to the depth of the liquid, h, at the center line of the cylinder by the formula V=[r2cos1(rrh)(rh)2rhh2]L Develop a Python function to create a plot of liquid volume versus depth. Here are the first few lines: import numpy as np def cyltank (r,L,plot_title): "in" create a plot of the volume of liquid in a horizontal, cylindrical tank from empty to full tank inputs: \[ \begin{array}{l} r=\text { inside radius of tank } \\ L=\text { length } \\ \text { plot_title = string for title of plot } \end{array} \] Test your program with cyltank (3,5, 'Volume vs, Depth for Horizontal Cylindrical Tank') P2. Piecewise functions are sometimes useful when the relationship between a dependent and independent variable cannot be adequately represented by a single equation. For example, the velocity of a rocket might be described by v(t)=10t25t6243t36t+12(t16)22136e0.1(t26)00t8826othenvise Develop a Python function to compute v with an input of t. Then, add a script that uses the function to generate a plot a v versus t for t=5 to 50 . P3. Determination of leap year in the current Western calendar is interesting. Leap year is every year divisible by four, except at the turn of the century, where, if the year is divisible by 400 , there is no leap year. So, 1900 was a leap year, but 2000 was not. Develop a Python function that has an input of the year and returns a result of True if it is a leap year and False if it is not a leap year. Test it with various years to validate the function

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_2

Step: 3

blur-text-image_3

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

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

c. What groups were least represented? Why do you think this is so?

Answered: 1 week ago

Question

7. Describe phases of multicultural identity development.

Answered: 1 week ago