Viving Frendiana - Penyelesaian Sistem Transmisi dengan Pemr

20 self.show() def hitung(self): ro = float(self.ui.txt_ro.text()) io = float(self.ui.txt_io.text()) rl = float(self.ui.txt_rl.text()) il = float(self.ui.txt_il.text()) if (ro==0 and io==0 and rl==0 and il==0): self.ui.lbl_error.setText("SEMUA INPUT BERNILAI 0") self.ui.lbl_sukses.setText("") self.ui.lbl_errorlz.setText("") self.ui.lbl_zl.setText(str()) self.ui.lbl_r1.setText(str()) self.ui.lbl_r2.setText(str()) self.ui.lbl_p1.setText(str()) self.ui.lbl_p2.setText(str()) else: self.ui.lbl_error.setText("") self.ui.lbl_sukses.setText("SUKSES MENGHITUNG") #mengganti nilai satuan pada Z0 if self.ui.satuan_zo.currentText() == "GΩ": ro = ro*10**9 io = io*10**9 elif self.ui.satuan_zo.currentText() == "MΩ": ro = ro*10**6 io = io*10**6 elif self.ui.satuan_zo.currentText() == "kΩ": ro = ro*10**3 io = io*10**3 elif self.ui.satuan_zo.currentText() == "Ω": ro io elif self.ui.satuan_zo.currentText() == "mΩ": ro = ro*10**-3 io = io*10**-3 elif self.ui.satuan_zo.currentText() == "µΩ": ro = ro*10**-6 io = io*10**-6 elif self.ui.satuan_zo.currentText() == "nΩ": ro = ro*10**-9 io = io*10**-9 elif self.ui.satuan_zo.currentText() == "pΩ": ro = ro*10**-12 io = io*10**-12 #mengganti nilai satuan pada ZL if self.ui.satuan_zl.currentText() == "GΩ": rl = rl*10**9

RkJQdWJsaXNoZXIy MTM3NDc5MQ==