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

Another question on Engineering

question
Engineering, 03.07.2019 23:20
Two technicians are discussing the intake air temperature (iat) sensor. technician a says that the computer uses the iat sensor as a backup to the engine coolant temperature (ect) sensor. technician b says that the powertrain control module (pcm) will subtract the calculated amount of fuel if the air measures hot. who is correct
Answers: 3
question
Engineering, 04.07.2019 18:10
Steel is coated with a thin layer of ceramic to protect against corrosion. what do you expect to happen to the coating when the temperature of the steel is increased significantly? explain.
Answers: 1
question
Engineering, 04.07.2019 18:10
Acompressor receives the shaft work to decrease the pressure of the fluid. a)- true b)- false
Answers: 3
question
Engineering, 04.07.2019 18:10
Condition monitoring is a major component of. (clo4) a)- predictive maintenance. b)-preventive maintenance c)-proactive maintenance d)-reactive maintenance.
Answers: 1
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
question
Mathematics, 17.10.2020 07:01
question
Chemistry, 17.10.2020 07:01
question
English, 17.10.2020 07:01
question
History, 17.10.2020 07:01
Questions on the website: 13722367