Viving Frendiana - Penyelesaian Sistem Transmisi dengan Pemr

99 7.3 PENYELESAIAN TRANSFORMATOR λ/4 & TRANSFORMATOR λ/2 DENGAN PEMROGRAMAN calltransformator.pyw import sys import os import math import numpy as np import cmath from PyQt5.QtWidgets import QDialog,QApplication from transformator import * class MyForm(QDialog): def __init__(self): super().__init__() self.ui = Ui_Dialog() self.ui.setupUi(self) self.ui.calculateq.clicked.connect(self.hitung) self.ui.calculateh.clicked.connect(self.hitung1) self.show() def hitung(self): zo = float(self.ui.zo_input_realq.text().replace(',','. ')) zl1 = float(self.ui.zl_input_realq.text().replace(',','. ')) zl2 = float(self.ui.zl_input_imajinerq.text().replace(', ','.')) f = float(self.ui.frekuensi_inputq.text().replace(',', '.')) if (zo==0 and zl1==0 and zl2==0 and f==0): self.ui.lbl_gagal.setText("GAGAL MENGHITUNG") self.ui.lbl_sukses.setText("") self.ui.daya_outputq.setText(str()) self.ui.d_outputq.setText(str()) self.ui.zind_outputq.setText(str()) self.ui.dlambda_outputq.setText(str())

RkJQdWJsaXNoZXIy MTM3NDc5MQ==