Category : calculator

I wanted to make two frames for the scientific calculator project I was tasked to code; one part would be the calculator and the other part would show the history of operations that were typed in by the user, here is what I have tried so far: import math import tkinter.messagebox from tkinter import * ..

Read more

pi=3.14 print("welcome to the calculator") print("what would you like to calculate") c = input("multiplication-m, addition-a, subtraction-s, division-d, area-ar ") print("you selected "+ c) if (c == "ar"): on=int(input("enter your first number ")) else: fn =int(input("enter your first number ")) sn =int(input("enter your second number ")) if (c == "a"): r=fn+sn if (c == "s"): r=fn-sn ..

Read more

num1 = float(input(‘Selecione seu primeiro número.’)) op = input(‘Selecione a sua forma de operação.’) num2 = float(input(‘Selecione seu segundo número.’)) op2 = input(‘Selecione a sua segunda forma de operação.’) num3 = float(input(‘Selecione seu terceiro número.’) if op == ‘+’ and op2 == ‘+’: print (num1 + num2 + num3) Someone could tell me what is ..

Read more

I’m tryna program my calc project to perform operations. It can perform addition and I want it to perform the remaining four (minus, multiplication, division, powers) But I’m stuck coz of this error. Error… C:UsersAdminPycharmProjectsvenvScriptspython.exe "C:/Users/Admin/PycharmProjects/pythonProject/Calculator GUI v1.0.py" Exception in Tkinter callback Traceback (most recent call last): File "C:UsersAdminPython3.9libtkinter__init__.py", line 1892, in __call__ return self.func(*args) ..

Read more

I’m working on a calculator GUI. I’ve finished working on the GUI itself and now I’m working on making the calc perform operations. It’s supposed to perform addition, subtraction, multiplication and division, and squares. But I keep getting this error which is bugging me. Traceback (most recent call last): File "C:UsersAdminPython3.9libtkinter__init__.py", line 1892, in __call__ ..

Read more