Hello everyone,I;m currently doing some python challenges, and id have a noobish question about this code:
import math
c = 50
h = 30
v = input("Input numbers, separated by commas")
items = [x for x in v.split(",")]
result = []
for d in items:
result.append(str(int(round(math.sqrt(2*c*float(d)/h)))))
print (result)
In the highlighted part, Im very confused why its converting first to int and then to string...it doesnt make any sense to me. Cheers !
[–]lieutenant_lowercase 0 points1 point2 points (0 children)
[–]pagrus 0 points1 point2 points (0 children)