generate functionMon, 06 Mar 2023

enter a floating point number n. Output ten numbers whose sum is equal to n. In the ten numbers displayed, the numbers do not go in a row. The range of output numbers is from 0.001 to 1. The output ten digits have exactly twelve digits after the decimal point. The output numbers are strictly greater than 0.

def devide_ten(n): list = [] for i in range(10): list.append(round(n/10, 12)) n = n - n/10 return list devide_ten(50)

Questions about programming?Chat with your personal AI assistant