from math import * a=int(0) l=float(input('indicate the length of the beam = ')) np =int(input('indicate the number of points on the beam = ')) for i in range(0,np): a+=(l/np) print("%.1f" % a)
Quote:apparently the program works well, but I needed to consider the value 0 also in the for result
for i in range(0,np+1): print("%.1f" % a) a+=(l/np)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)