ui.label.setText("%.2f" % + {result} + ' %')
TypeError: must be real number, not set
def bp():
first_mass = float(ui.lineEdit.text())
second_mass = float(ui.lineEdit_2.text())
result = 100 - (second_mass / (first_mass / 100))
ui.label.setText("%.2f" % + {result} + ' %')
ui.pushButton.clicked.connect(bp)