subject
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.

ansver
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 03:10, lauriepdx17
What precautions should you take to prevent injuries when dealing with heavy loads?
Answers: 1
image
Engineering, 04.07.2019 18:10, kevin72836
Consider a large isothermal enclosure that is maintained at a uniform temperature of 2000 k. calculate the emissive power of the radiation that emerges from a small aperture on the enclosure surface. what is the wavelength ? , below which 10% of the emission is concentrated? what is the wavelength ? 2 above which 10% of the emission is concentrated? determine the wavelength at which maximum spectral emissive power occurs. what is the irradiation incident on a small object placed inside the enclosure?
Answers: 2
image
Engineering, 04.07.2019 18:10, aliopqwas
Condition monitoring is a major component of. (clo4) a)- predictive maintenance. b)-preventive maintenance c)-proactive maintenance d)-reactive maintenance.
Answers: 1
image
Engineering, 04.07.2019 18:20, kodyclancy
Aquick transition of the operating speed of a shaft from its critical speed will whirl amplitude. (a) increase (b) limit (c) not affect (d) zero
Answers: 2
You know the right 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
History, 15.04.2021 18:10
Konu
Mathematics, 15.04.2021 18:10
Questions on the website: 13722361