Oct-20-2017, 06:09 PM
drop the else and code after, then add 1 to high .. so you get:
a = 'Pounds' b = 'Ounces' c = 'Kilograms' low = int(input('Enter a low value:')) high = int(input('Enter a high value:')) step = int(input('Enter a step value:')) print('{0:<10}{1:^10}{2:>10}'.format(a, b, c)) for weight in range(low, high+1, step): print('{0:<10.1f}{1:^10.1f}{2:>10.1f}'.format(weight, weight * 16, weight * 453.592))test:
Output:Enter a low value:1
Enter a high value:10
Enter a step value:1
Pounds Ounces Kilograms
1.0 16.0 453.6
2.0 32.0 907.2
3.0 48.0 1360.8
4.0 64.0 1814.4
5.0 80.0 2268.0
6.0 96.0 2721.6
7.0 112.0 3175.1
8.0 128.0 3628.7
9.0 144.0 4082.3
10.0 160.0 4535.9
Enter a low value:1
Enter a high value:100
Enter a step value:10
Pounds Ounces Kilograms
1.0 16.0 453.6
11.0 176.0 4989.5
21.0 336.0 9525.4
31.0 496.0 14061.4
41.0 656.0 18597.3
51.0 816.0 23133.2
61.0 976.0 27669.1
71.0 1136.0 32205.0
81.0 1296.0 36741.0
91.0 1456.0 41276.9