Engineering
Engineering, 10.02.2020 23:04, dayanara72

Create a new Python script. Write a function to do each of these tasks. Also, put code in your script to call and test these functions.

Functions to write:

a) A function that takes in a person's name as a parameter, and prints that name 5 times, each on its own line. Test with different names.

b) A function that takes two parameters - a person's name, and a number of times to print the name, once per line.

c) A function that takes two parameters corresponding to the a and b sides of a right triangle. Have the function print out the hypotenuse of the triangle using the Pythagorean Theorem ( you'll need the math. sqrt() function).

d) A function that takes three parameters corresponding to the a, b, and c values of a quadratic equation. Use the quadratic formula to calculate both roots for the given a, b, and c values and print them out.

answer
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, koolgurl2003
Apump is used to circulate hot water in a home heating system. water enters the well-insulated pump operating at steady state at a rate of 0.42 gal/min. the inlet pressure and temperature are 14.7 lbf/in.2, and 180°f, respectively; at the exit the pressure is 60 lbf/in.2 the pump requires 1/15 hp of power input. water can be modeled as an incompressible substance with constant density of 60.58 lb/ft3 and constant specific heat of 1 btu/lb or. neglecting kinetic and potential energy effects, determine the temperature change, in °r, as the water flows through the pump.
Answers: 1
image
Engineering, 04.07.2019 18:20, maustin5323
Athin walled concentric tube exchanger is used to cool engine oil from 160°c to 60°c with water that is available at 25°c acting as a coolant. the oil and water flow rates are each at 2 kg/s, and the diameter of the inner tube is 0.5 m and the corresponding value of the overall heat transfer coefficient is 250 w/m2. oc. how long must the heat exchanger be to accomplish the desired cooling? cpwater=4.187 kj/kg-candcpengine el=2.035 kj/kg·°c, oil . 120]
Answers: 1
image
Engineering, 04.07.2019 18:20, xcapo1x
Refrigerant-134a enters the compressor of a refrigerator as superheated vapor at 0.14 mpa and -10°c at a rate of 0.05 ka/s and leaves at 0.8 mpa and 50°c. the refrigerant is cooied in the condenser to 0.72 mpa and 26'c. it is then throttled to 0.15 mpa. sketch the t-s diagram for the system and evaluate: 6) the rate of heat removai from the refrigerated space (kw), it) the power input to the compressor (kw), ii) the isentropic efficiency of the compressor (%), and iv) the cop of the refrigerator.
Answers: 2
image
Engineering, 04.07.2019 19:10, netflixacc0107
What is the major difference between thermoplastics and thermosetting plastics from the polymerization structure point of view?
Answers: 2
Do you know the correct answer?
Create a new Python script. Write a function to do each of these tasks. Also, put code in your scrip...

Questions in other subjects:

Konu
Mathematics, 08.12.2020 02:20
Konu
Mathematics, 08.12.2020 02:20