Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 712 Bytes

File metadata and controls

21 lines (12 loc) · 712 Bytes

024 print formula

📝 Instructions:

  1. Write a function print_formula() that calculates and prints the value according to the given formula: Q = Square root of [(2 * C * D)/H]. The fixed value of C is 50 and and the fixed value of H is 30. D is the variable whose values should be assigned through the parameters.

Example input:

print_formula(100,150,180)

Example output:

  • 18,22,24

💡 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).

  • In case of input data being supplied to the question, it should be assumed to be a console input.