Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 649 Bytes

File metadata and controls

33 lines (21 loc) · 649 Bytes

025 Print formula

📝 Instructions:

  1. Write a function print_formula(), with one parameter that calculates and prints the value according to the given formula:
Q = Square root of (2 * c * d / h)

Following are the fixed values of c and h:

  • c is 50.
  • h is 30.
  • d would be the parameter of the function.

📎 Example input:

print_formula(150)

📎 Example output:

22

💡 Hints:

  • If the output received is in decimal form, it should be rounded off to its nearest value (for example, if the output received is 26.0, it should be printed as 26).

  • Import the math module.