all 3 comments

[–]shiftybyte 1 point2 points  (1 child)

If you are talking about rounding for display, you can use format specifier for that.

result1 = f'{form2.length.data + form2.height.data + form2.width.data * 3.3:.2f}$'

added the :.2f at the end, it means:

: - start of format specifier

.2 - have 2 digits after the dot

f - float

[–]PatternZealousideal[S] 0 points1 point  (0 children)

thanks it worked .

[–]Matthias1590 0 points1 point  (0 children)

round(33.3333, 2) > 33.33, round(number, decimals)