Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help for what the specific python to use for this question - specially task 2 Question: Part A: Functions This part consists of

I need help for what the specific python to use for this question - specially task 2

Question:

image text in transcribed

Part A: Functions This part consists of 2 tasks. Nule that Tak 2 is a continuativa of Task 1, so you need to do boa in kr Task 1 Consider the following mathematical function ilizak z zt a WHIC 2 and a ang inathenatical suble of the function Hizm). Ia tlus Task you see assod to wuite a Pytbon function to compute H2,0). The Python function that you need to write has the following def line: de proportion(2.a): wice the Python variabka z und & correspond to the matematical symbols of the same name. This function should ictuma one output which is the value of H2... For cample, if you call the function in tlic statement proportion(9,8) then the Python variable pliskes in the value of 0.25. You can use this template lile lab04_3.py inole: right click to downlsul get you slated. The file has a few test caves that you can use to check your program. Hint: You can coasull die Python program iny_powerpy (discussed in Weck 2x lecture) which uses 2 inputs and cut ouc Output Tosk 2 In this task, you are asked to write a Python function which computes the the mathematical functicin xhax.ch c c *+by+c WTO X, b. y and care mathematical variables of the luneliun Gfx.b.x.e). In this Task, you are asked to wrile ayuwun Tunction to compule Gfx,b.y.c!. The Pyrbon function that you need to write has the following def lic de two proportione(x,1.7.0): where the rythua variables x, b. y and correspond to the mathematical symbols of the same name. This function should return three Oulpuls, in this specilie under G...) the ratio of tox+b) be ratio of elu fy+c) For example, if you call the fonction in the line: 11, 12 - two_proportions(2,6,8,35) then the Python variables E. 1 amd r2 tske unibe value of Inspectively, 0.21875.0.25 0.875. You may notice there are some similarities between the expression of Gixhy.c) and Hizm), For this task, we impose the requirement that your function to proportionsmus call the function reportion. The parpose is for you to practice calling a function from another function, You can complete this task in the file lah04_a.py Hina Youth RIMUM 3. US Week 2s lectus as a guide. This program sbows you how to returns multiple outputs as well as to call a Lunction within twiler 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

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

More Books

Students also viewed these Databases questions

Question

Handle crisis communications.

Answered: 1 week ago