# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'advCalc.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_MainWindow(QtWidgets.QMainWindow):
    expression = ""
    isopr = False
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(668, 588)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.pushButton_9 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_9.setGeometry(QtCore.QRect(280, 130, 101, 81))
        self.pushButton_9.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_9.setObjectName("pushButton_9")
        self.pushButton_20 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_20.setGeometry(QtCore.QRect(550, 130, 101, 81))
        self.pushButton_20.setStyleSheet("font: 75 18pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_20.setObjectName("pushButton_20")
        self.pushButton_13 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_13.setGeometry(QtCore.QRect(410, 240, 101, 81))
        self.pushButton_13.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_13.setObjectName("pushButton_13")
        self.pushButton_24 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_24.setGeometry(QtCore.QRect(280, 350, 101, 81))
        self.pushButton_24.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_24.setObjectName("pushButton_24")
        self.pushButton_12 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_12.setGeometry(QtCore.QRect(410, 460, 101, 81))
        self.pushButton_12.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_12.setObjectName("pushButton_12")
        self.pushButton_3 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_3.setGeometry(QtCore.QRect(20, 460, 101, 81))
        self.pushButton_3.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;\n"
"")
        self.pushButton_3.setObjectName("pushButton_3")
        self.pushButton_6 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_6.setGeometry(QtCore.QRect(280, 240, 101, 81))
        self.pushButton_6.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_6.setObjectName("pushButton_6")
        self.pushButton_23 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_23.setGeometry(QtCore.QRect(150, 350, 101, 81))
        self.pushButton_23.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_23.setObjectName("pushButton_23")
        self.pushButton_10 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_10.setGeometry(QtCore.QRect(410, 130, 101, 81))
        self.pushButton_10.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_10.setObjectName("pushButton_10")
        self.pushButton_5 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_5.setGeometry(QtCore.QRect(150, 240, 101, 81))
        self.pushButton_5.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_5.setObjectName("pushButton_5")
        self.pushButton_7 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_7.setGeometry(QtCore.QRect(20, 130, 101, 81))
        self.pushButton_7.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_7.setObjectName("pushButton_7")
        self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_2.setGeometry(QtCore.QRect(150, 460, 101, 81))
        self.pushButton_2.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_8 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_8.setGeometry(QtCore.QRect(150, 130, 101, 81))
        self.pushButton_8.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_8.setObjectName("pushButton_8")
        self.pushButton_15 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_15.setGeometry(QtCore.QRect(280, 460, 101, 81))
        self.pushButton_15.setStyleSheet("font: 75 18pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_15.setObjectName("pushButton_15")
        self.pushButton_4 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_4.setGeometry(QtCore.QRect(20, 240, 101, 81))
        self.pushButton_4.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_4.setObjectName("pushButton_4")
        self.pushButton_22 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_22.setGeometry(QtCore.QRect(20, 350, 101, 81))
        self.pushButton_22.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_22.setObjectName("pushButton_22")
        self.pushButton_19 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_19.setGeometry(QtCore.QRect(550, 350, 101, 81))
        self.pushButton_19.setStyleSheet("font: 75 18pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_19.setObjectName("pushButton_19")
        self.pushButton_17 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_17.setGeometry(QtCore.QRect(410, 350, 101, 81))
        self.pushButton_17.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_17.setObjectName("pushButton_17")
        self.pushButton_11 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_11.setGeometry(QtCore.QRect(550, 460, 101, 81))
        self.pushButton_11.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_11.setObjectName("pushButton_11")
        self.pushButton_16 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_16.setGeometry(QtCore.QRect(550, 240, 101, 81))
        self.pushButton_16.setStyleSheet("font: 75 18pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_16.setObjectName("pushButton_16")
        self.lineEdit = QtWidgets.QLineEdit(self.centralwidget)
        self.lineEdit.setGeometry(QtCore.QRect(20, 40, 631, 61))
        self.lineEdit.setObjectName("lineEdit")
        self.lineEdit.setAlignment(QtCore.Qt.AlignRight)
        self.lineEdit.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\"t;")

        self.frame = QtWidgets.QFrame(self.centralwidget)
        self.frame.setGeometry(QtCore.QRect(10, 10, 641, 541))
        self.frame.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.pushButton_25 = QtWidgets.QPushButton(self.frame)
        self.pushButton_25.setGeometry(QtCore.QRect(280, 400, 61, 60))
        self.pushButton_25.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_25.setObjectName("pushButton_25")
        self.pushButton_14 = QtWidgets.QPushButton(self.frame)
        self.pushButton_14.setGeometry(QtCore.QRect(280, 480, 61, 60))
        self.pushButton_14.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;\n"
"")
        self.pushButton_14.setObjectName("pushButton_14")
        self.pushButton_18 = QtWidgets.QPushButton(self.frame)
        self.pushButton_18.setGeometry(QtCore.QRect(0, 240, 61, 60))
        self.pushButton_18.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_18.setObjectName("pushButton_18")
        self.pushButton_38 = QtWidgets.QPushButton(self.frame)
        self.pushButton_38.setGeometry(QtCore.QRect(280, 80, 61, 60))
        self.pushButton_38.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_38.setObjectName("pushButton_38")
        self.pushButton_21 = QtWidgets.QPushButton(self.frame)
        self.pushButton_21.setGeometry(QtCore.QRect(190, 240, 61, 60))
        self.pushButton_21.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_21.setObjectName("pushButton_21")
        self.pushButton_26 = QtWidgets.QPushButton(self.frame)
        self.pushButton_26.setGeometry(QtCore.QRect(380, 240, 60, 60))
        self.pushButton_26.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_26.setObjectName("pushButton_26")
        self.pushButton_28 = QtWidgets.QPushButton(self.frame)
        self.pushButton_28.setGeometry(QtCore.QRect(0, 80, 61, 60))
        self.pushButton_28.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_28.setObjectName("pushButton_28")
        self.pushButton_27 = QtWidgets.QPushButton(self.frame)
        self.pushButton_27.setGeometry(QtCore.QRect(380, 480, 60, 60))
        self.pushButton_27.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_27.setObjectName("pushButton_27")
        self.pushButton_29 = QtWidgets.QPushButton(self.frame)
        self.pushButton_29.setGeometry(QtCore.QRect(190, 160, 61, 60))
        self.pushButton_29.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_29.setObjectName("pushButton_29")
        self.pushButton_45 = QtWidgets.QPushButton(self.frame)
        self.pushButton_45.setGeometry(QtCore.QRect(580, 160, 61, 60))
        self.pushButton_45.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_45.setObjectName("pushButton_45")
        self.pushButton_30 = QtWidgets.QPushButton(self.frame)
        self.pushButton_30.setGeometry(QtCore.QRect(380, 400, 60, 60))
        self.pushButton_30.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_30.setObjectName("pushButton_30")
        self.pushButton_43 = QtWidgets.QPushButton(self.frame)
        self.pushButton_43.setGeometry(QtCore.QRect(580, 400, 61, 60))
        self.pushButton_43.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_43.setObjectName("pushButton_43")
        self.pushButton_31 = QtWidgets.QPushButton(self.frame)
        self.pushButton_31.setGeometry(QtCore.QRect(190, 400, 61, 60))
        self.pushButton_31.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_31.setObjectName("pushButton_31")
        self.pushButton_33 = QtWidgets.QPushButton(self.frame)
        self.pushButton_33.setGeometry(QtCore.QRect(380, 160, 60, 60))
        self.pushButton_33.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_33.setObjectName("pushButton_33")
        self.pushButton_32 = QtWidgets.QPushButton(self.frame)
        self.pushButton_32.setGeometry(QtCore.QRect(100, 480, 61, 60))
        self.pushButton_32.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;\n"
"")
        self.pushButton_32.setObjectName("pushButton_32")
        self.pushButton_34 = QtWidgets.QPushButton(self.frame)
        self.pushButton_34.setGeometry(QtCore.QRect(380, 320, 60, 60))
        self.pushButton_34.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_34.setObjectName("pushButton_34")
        self.pushButton_35 = QtWidgets.QPushButton(self.frame)
        self.pushButton_35.setGeometry(QtCore.QRect(480, 320, 61, 60))
        self.pushButton_35.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_35.setObjectName("pushButton_35")
        self.pushButton_36 = QtWidgets.QPushButton(self.frame)
        self.pushButton_36.setGeometry(QtCore.QRect(280, 240, 61, 60))
        self.pushButton_36.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_36.setObjectName("pushButton_36")
        self.pushButton_39 = QtWidgets.QPushButton(self.frame)
        self.pushButton_39.setGeometry(QtCore.QRect(280, 160, 61, 60))
        self.pushButton_39.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_39.setObjectName("pushButton_39")
        self.pushButton_44 = QtWidgets.QPushButton(self.frame)
        self.pushButton_44.setGeometry(QtCore.QRect(580, 320, 61, 60))
        self.pushButton_44.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_44.setObjectName("pushButton_44")
        self.pushButton_37 = QtWidgets.QPushButton(self.frame)
        self.pushButton_37.setGeometry(QtCore.QRect(190, 480, 61, 60))
        self.pushButton_37.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;\n"
"")
        self.pushButton_37.setObjectName("pushButton_37")
        self.pushButton_41 = QtWidgets.QPushButton(self.frame)
        self.pushButton_41.setGeometry(QtCore.QRect(580, 480, 61, 60))
        self.pushButton_41.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_41.setObjectName("pushButton_41")
        self.pushButton_40 = QtWidgets.QPushButton(self.frame)
        self.pushButton_40.setGeometry(QtCore.QRect(100, 80, 61, 60))
        self.pushButton_40.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_40.setObjectName("pushButton_40")
        self.pushButton_42 = QtWidgets.QPushButton(self.frame)
        self.pushButton_42.setGeometry(QtCore.QRect(380, 80, 60, 60))
        self.pushButton_42.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_42.setObjectName("pushButton_42")
        self.pushButton_46 = QtWidgets.QPushButton(self.frame)
        self.pushButton_46.setGeometry(QtCore.QRect(280, 320, 61, 60))
        self.pushButton_46.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_46.setObjectName("pushButton_46")
        self.pushButton_47 = QtWidgets.QPushButton(self.frame)
        self.pushButton_47.setGeometry(QtCore.QRect(190, 80, 61, 60))
        self.pushButton_47.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_47.setObjectName("pushButton_47")
        self.pushButton_48 = QtWidgets.QPushButton(self.frame)
        self.pushButton_48.setGeometry(QtCore.QRect(100, 400, 61, 60))
        self.pushButton_48.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_48.setObjectName("pushButton_48")
        self.pushButton_49 = QtWidgets.QPushButton(self.frame)
        self.pushButton_49.setGeometry(QtCore.QRect(100, 320, 61, 60))
        self.pushButton_49.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_49.setObjectName("pushButton_49")
        self.pushButton_50 = QtWidgets.QPushButton(self.frame)
        self.pushButton_50.setGeometry(QtCore.QRect(100, 240, 61, 60))
        self.pushButton_50.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_50.setObjectName("pushButton_50")
        self.pushButton_51 = QtWidgets.QPushButton(self.frame)
        self.pushButton_51.setGeometry(QtCore.QRect(480, 480, 61, 60))
        self.pushButton_51.setStyleSheet("font: 75 20pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_51.setObjectName("pushButton_51")
        self.pushButton_52 = QtWidgets.QPushButton(self.frame)
        self.pushButton_52.setGeometry(QtCore.QRect(190, 320, 61, 60))
        self.pushButton_52.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";\n"
"background-color:white;\n"
"color:black;\n"
"font:bold;\n"
"border-width:3px;\n"
"border-color:silver;\n"
"border-style:outset;")
        self.pushButton_52.setObjectName("pushButton_52")
        self.pushButton_53 = QtWidgets.QPushButton(self.frame)
        self.pushButton_53.setGeometry(QtCore.QRect(480, 80, 61, 60))
        self.pushButton_53.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_53.setObjectName("pushButton_53")
        self.pushButton_54 = QtWidgets.QPushButton(self.frame)
        self.pushButton_54.setGeometry(QtCore.QRect(480, 160, 61, 60))
        self.pushButton_54.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_54.setObjectName("pushButton_54")
        self.pushButton_55 = QtWidgets.QPushButton(self.frame)
        self.pushButton_55.setGeometry(QtCore.QRect(0, 400, 61, 60))
        self.pushButton_55.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_55.setObjectName("pushButton_55")
        self.pushButton_56 = QtWidgets.QPushButton(self.frame)
        self.pushButton_56.setGeometry(QtCore.QRect(480, 400, 61, 60))
        self.pushButton_56.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_56.setObjectName("pushButton_56")
        self.pushButton_57 = QtWidgets.QPushButton(self.frame)
        self.pushButton_57.setGeometry(QtCore.QRect(580, 240, 61, 60))
        self.pushButton_57.setStyleSheet("font: 75 11pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_57.setObjectName("pushButton_57")
        self.pushButton_58 = QtWidgets.QPushButton(self.frame)
        self.pushButton_58.setGeometry(QtCore.QRect(100, 160, 61, 60))
        self.pushButton_58.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_58.setObjectName("pushButton_58")
        self.pushButton_59 = QtWidgets.QPushButton(self.frame)
        self.pushButton_59.setGeometry(QtCore.QRect(0, 480, 61, 60))
        self.pushButton_59.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_59.setObjectName("pushButton_59")
        self.pushButton_60 = QtWidgets.QPushButton(self.frame)
        self.pushButton_60.setGeometry(QtCore.QRect(0, 160, 61, 60))
        self.pushButton_60.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_60.setObjectName("pushButton_60")
        self.pushButton_61 = QtWidgets.QPushButton(self.frame)
        self.pushButton_61.setGeometry(QtCore.QRect(0, 320, 61, 60))
        self.pushButton_61.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_61.setObjectName("pushButton_61")
        self.pushButton_62 = QtWidgets.QPushButton(self.frame)
        self.pushButton_62.setGeometry(QtCore.QRect(480, 240, 61, 60))
        self.pushButton_62.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_62.setObjectName("pushButton_62")
        self.lineEdit_2 = QtWidgets.QLineEdit(self.frame)
        self.lineEdit_2.setGeometry(QtCore.QRect(10, 20, 631, 51))
        self.lineEdit_2.setStyleSheet("font: 16pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(255, 255, 255);")
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.pushButton_63 = QtWidgets.QPushButton(self.frame)
        self.pushButton_63.setGeometry(QtCore.QRect(580, 80, 61, 60))
        self.pushButton_63.setStyleSheet("font: 75 14pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
        self.pushButton_63.setObjectName("pushButton_63")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 668, 21))
        self.menubar.setObjectName("menubar")
        self.menuOption = QtWidgets.QMenu(self.menubar)
        self.menuOption.setObjectName("menuOption")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionStandard_Calculator = QtWidgets.QAction(MainWindow)
        self.actionStandard_Calculator.setObjectName("actionStandard_Calculator")
        self.actionScientific_Calculator = QtWidgets.QAction(MainWindow)
        self.actionScientific_Calculator.setObjectName("actionScientific_Calculator")
        self.menuOption.addAction(self.actionStandard_Calculator)
        self.menuOption.addAction(self.actionScientific_Calculator)
        self.menubar.addAction(self.menuOption.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.pushButton_9.setText(_translate("MainWindow", "9"))
        self.pushButton_20.setText(_translate("MainWindow", "C"))
        self.pushButton_13.setText(_translate("MainWindow", "-"))
        self.pushButton_24.setText(_translate("MainWindow", "3"))
        self.pushButton_12.setText(_translate("MainWindow", "*"))
        self.pushButton_3.setText(_translate("MainWindow", "."))
        self.pushButton_6.setText(_translate("MainWindow", "6"))
        self.pushButton_23.setText(_translate("MainWindow", "2"))
        self.pushButton_10.setText(_translate("MainWindow", "+"))
        self.pushButton_5.setText(_translate("MainWindow", "5"))
        self.pushButton_7.setText(_translate("MainWindow", "7"))
        self.pushButton_2.setText(_translate("MainWindow", "0"))
        self.pushButton_8.setText(_translate("MainWindow", "8"))
        self.pushButton_15.setText(_translate("MainWindow", "%"))
        self.pushButton_4.setText(_translate("MainWindow", "4"))
        self.pushButton_22.setText(_translate("MainWindow", "1"))
        self.pushButton_19.setText(_translate("MainWindow", "1/X"))
        self.pushButton_17.setText(_translate("MainWindow", "÷"))
        self.pushButton_11.setText(_translate("MainWindow", "="))
        self.pushButton_16.setText(_translate("MainWindow", "√X"))
        self.pushButton_25.setText(_translate("MainWindow", "3"))
        self.pushButton_14.setText(_translate("MainWindow", "+/-"))
        self.pushButton_18.setText(_translate("MainWindow", "exp"))
        self.pushButton_38.setText(_translate("MainWindow", "("))
        self.pushButton_21.setText(_translate("MainWindow", "8"))
        self.pushButton_26.setText(_translate("MainWindow", "+"))
        self.pushButton_28.setText(_translate("MainWindow", "sin"))
        self.pushButton_27.setText(_translate("MainWindow", "*"))
        self.pushButton_29.setText(_translate("MainWindow", "csc"))
        self.pushButton_45.setText(_translate("MainWindow", "x^y"))
        self.pushButton_30.setText(_translate("MainWindow", "÷"))
        self.pushButton_43.setText(_translate("MainWindow", "{"))
        self.pushButton_31.setText(_translate("MainWindow", "2"))
        self.pushButton_33.setText(_translate("MainWindow", "e"))
        self.pushButton_32.setText(_translate("MainWindow", "."))
        self.pushButton_34.setText(_translate("MainWindow", "-"))
        self.pushButton_35.setText(_translate("MainWindow", "√x"))
        self.pushButton_36.setText(_translate("MainWindow", "9"))
        self.pushButton_39.setText(_translate("MainWindow", ")"))
        self.pushButton_44.setText(_translate("MainWindow", "⌫"))
        self.pushButton_37.setText(_translate("MainWindow", "0"))
        self.pushButton_41.setText(_translate("MainWindow", "}"))
        self.pushButton_40.setText(_translate("MainWindow", "tan"))
        self.pushButton_42.setText(_translate("MainWindow", "π"))
        self.pushButton_46.setText(_translate("MainWindow", "6"))
        self.pushButton_47.setText(_translate("MainWindow", "sec"))
        self.pushButton_48.setText(_translate("MainWindow", "1"))
        self.pushButton_49.setText(_translate("MainWindow", "4"))
        self.pushButton_50.setText(_translate("MainWindow", "7"))
        self.pushButton_51.setText(_translate("MainWindow", "="))
        self.pushButton_52.setText(_translate("MainWindow", "5"))
        self.pushButton_53.setText(_translate("MainWindow", "x^2"))
        self.pushButton_54.setText(_translate("MainWindow", "x^3"))
        self.pushButton_55.setText(_translate("MainWindow", "log"))
        self.pushButton_56.setText(_translate("MainWindow", "1/x"))
        self.pushButton_57.setText(_translate("MainWindow", "10^x"))
        self.pushButton_58.setText(_translate("MainWindow", "cot"))
        self.pushButton_59.setText(_translate("MainWindow", "|x|"))
        self.pushButton_60.setText(_translate("MainWindow", "cos"))
        self.pushButton_61.setText(_translate("MainWindow", "mod"))
        self.pushButton_62.setText(_translate("MainWindow", "C"))
        self.pushButton_63.setText(_translate("MainWindow", "n!"))
        self.menuOption.setTitle(_translate("MainWindow", "Option"))
        self.actionStandard_Calculator.setText(_translate("MainWindow", "Standard Calculator"))
        self.actionScientific_Calculator.setText(_translate("MainWindow", "Scientific Calculator"))
        self.frame.hide()
        self.initEvents()
        
    def initEvents(self):
        self.actionScientific_Calculator.triggered.connect(self.showScientific)
        self.actionStandard_Calculator.triggered.connect(self.showStandard)
        buttons = [self.pushButton_2,self.pushButton_22,self.pushButton_23,
        self.pushButton_24,self.pushButton_4,self.pushButton_5,
        self.pushButton_6,self.pushButton_7,self.pushButton_8,self.pushButton_9,self.pushButton_3]

        operator = [self.pushButton_10,self.pushButton_13,self.pushButton_17,
        self.pushButton_12,self.pushButton_15,self.pushButton_16,self.pushButton_19]

        for btn in buttons:
                btn.clicked.connect(self.appendNum)

        for op_btn in operator:
                op_btn.clicked.connect(self.appendOpr)
        self.pushButton_11.clicked.connect(self.evaluate)
        self.pushButton_20.clicked.connect(self.clear)
        
         


    def showScientific(self):
            self.frame.show()
        
    def showStandard(self):
            self.frame.hide()

    def appendNum(self):
            btn = self.sender()

            num = btn.text()
            self.expression +=num
            self.lineEdit.setText(self.expression)
            self.isopr = False
            
    def evaluate(self):
        try:
            result = eval(self.expression)
            self.expression = str(result)
            self.lineEdit.setText(self.expression)
        except BaseException as ex:
                print(ex)
    

    def clear(self):
            self.expression =""
            self.lineEdit.setText(self.expression)


    def appendOpr(self):

            btn = self.sender()
            btn.setStyleSheet("font: 75 18pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(255, 0, 0);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(255, 255, 255);\n"
"border-style:outset;")
            oper = [self.pushButton_10,self.pushButton_13,self.pushButton_17,
        self.pushButton_12,self.pushButton_15,self.pushButton_16,self.pushButton_19]
            for i in oper:
                if i != btn:
                    i.setStyleSheet("font: 75 18pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(222, 222, 222);\n"
"color:black;\n"
"\n"
"border-width:3px;\n"
"border-color: rgb(115, 115, 115);\n"
"border-style:outset;")
            opr = btn.text()
            if self.isopr == False:
                self.expression = self.expression + opr
                self.lineEdit.setText(self.expression)
            else:
                self.expression = self.expression[0:len(self.expression)-1]+opr
                self.lineEdit.setText(self.expression)

            self.isopr = True
            
       

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())
