Question

2.32 LAB: Using math functions Given three floating-point numbers x, y, and z, output x to...

2.32 LAB: Using math functions Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolute value of (x minus y), and the square root of (x to the power of z). Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f} {:.2f} {:.2f} {:.2f}'.format(your_value1, your_value2, your_value3, your_value4))

Ex: If the input is: 5.0 1.5 3.2 Then the output is: 172.47 361.66 3.50 13.13

PYTHON 3

0 0
Add a comment Improve this question Transcribed image text
Answer #1

x = float(input())
y = float(input())
z = float(input())
out1 = x**z
out2 = x**(y**z)
out3 = abs(x-y)
out4 = (x ** z)**0.5
print('{:.2f} {:.2f} {:.2f} {:.2f}'.format(out1, out2, out3, out4))

Add a comment
Know the answer?
Add Answer to:
2.32 LAB: Using math functions Given three floating-point numbers x, y, and z, output x to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Given three floating-point numbers x, y, and z, output x to the power of z, x...

    Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolute value of (x minus y), and the square root of (x to the power of z). Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f} {:.2f} {:.2f} {:.2f}'.format(your_value1, your_value2, your_value3, your_value4)) Ex: If the input is: 5.0 1.5 3.2 Then the output is:...

  • In C PLEASE 1.22 LAB: Using math functions Given three floating-point numbers x, y, and z,...

    In C PLEASE 1.22 LAB: Using math functions Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of 2), the absolute value of y, and the square root of (xy to the power of z). Output each floating-point value with two digits after the decimal point, which can be achieved as follows: printf("%0.21f", yourValue); Ex: If the input is: 5.0 6.5 3.2 the output is:...

  • 6.13 LAB: Step counter. Section 6.3. A pedometer treats walking 2,000 steps as walking 1 mile....

    6.13 LAB: Step counter. Section 6.3. A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output is the miles walked. Your program must define and call the following function. The function should return the amount of miles walked (that is: user_steps / 2000). def steps_to_miles(user_steps) Ex: If the input is: 5345 the output is: 2.67 Output each floating-point value with two digits after the decimal point, which...

  • This problem demonstrates the use of import module. The Python programming language has many strengths, but...

    This problem demonstrates the use of import module. The Python programming language has many strengths, but one of its best is the availability to use many existing modules for various tasks, and you do not need to be an experienced computer programmer to start using these modules. We have given you some incomplete code; note that the very first line of that code contains an import statement as follows: import math This statement enables your program to use a math...

  • Code in Coral please 2.17 LAB: Musical note frequencies On a piano, a key has a...

    Code in Coral please 2.17 LAB: Musical note frequencies On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * rn, where n is the distance (number of keys) from that key, and r is 2(1/12). Given an initial key frequency, output that frequency and the next 4 higher key frequencies. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}...

  • 4.16 LAB: Musical note frequencies On a piano, a key has a frequency, say f0. Each...

    4.16 LAB: Musical note frequencies On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0* r, where n is the distance (number of keys) from that key, and r is 2(1/12) Given an initial key frequency, output that frequency and the next 4 higher key frequencies. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('%0.2f %.2f %0.2f %0.2f %.2f' %...

  • Select the Python math module function that give you the Euclidean norm, square root of x*x...

    Select the Python math module function that give you the Euclidean norm, square root of x*x + y*y. This is the length of the vector from the origin to point (x, y). sin hypot cos sqrt radians What would be the value printed from the code below? import math print(math.ceil(math.e)) 7 2.718281 3.141592 2 3 What would be the value printed from the code below? import math print(math.floor(math.pi)) 2.718281 3.141592 2 3 6 ex is e raised to the power...

  • [5 pts] Design a circuit with three inputs (x,y,z) and one output that outputs true if the binary value of the inputs i...

    [5 pts] Design a circuit with three inputs (x,y,z) and one output that outputs true if the binary value of the inputs is a perfect square (it's square root is an integer). Construct the truth table, simplify using a K-map, and draw out the logic circuit diagram [5 pts] Design a circuit with three inputs (x,y,z) and one output that outputs true if the binary value of the inputs is a perfect square (it's square root is an integer). Construct...

  • The temperature at any point (x, y, z) in space is T = x y3 z4...

    The temperature at any point (x, y, z) in space is T = x y3 z4 Find the highest temperature on the surface 4 x2 + 4 y2 + z2 = 8. Enter the exact value of your answer in the box below. Warning: If your answer involves a square root, use either sqrt or power 1/2. Note: The highest temperature cannot be 0.

  • A comparison of floating point numbers x and y in practical code is typically given by...

    A comparison of floating point numbers x and y in practical code is typically given by |x − y| < E, for some user-chosen value of E > 0, to replace testing for exact equality by “Does x = y”?. The indicated comparison is not an equivalence relation between x and y. 1Ai. Which needed property fails to hold? (2 pts) 1Aii. Give a specific example of this failure to be an equivalence relation. (3 pts) A comparison of floating...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT