Write a program that calculates and prints the value according to the given formula: Q = Square root of [(2 * C * D)/H]


Topic: Write a program that calculates and prints the value according to the given formula: Q = Square root of [(2 * C * D)/H]

Solution

import math
c=50
h=30
value = []
items=[x for x in raw_input().split(',')]
for d in items:
    value.append(str(int(round(math.sqrt(2*c*float(d)/h)))))
print ','.join(value)



List all Python Programs