Problem with subtracting float numbers.
a=0.45
b=0.15
c=a-b
print (c,type(c))
c=int(100*(a-b))/100
print (c,type(c))
results: 0.30000000000000004 <class 'float'> 0.3 <class 'float'>
Is there a way to get only one decimal digit after period when using 'print' for output without using int function?