I’m new into programming and wanted to make my own calculator with my knowledge I’ve earned so far. For some reason it tells me that my first operator is invalid. Can someone tell me what I did wrong? And maybe what else I have to fix? Don’t add anything to my calculator, I want to ..
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 * ..
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 ..
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 ..
DETAILS: I wanted to make a simple calculator in Tkinter. I have attached two codes , I just wanted to know what is the difference between the two codes as in one the buttons are coming 3 in a row but in other it is coming all in a row. CODE 1 (in which everything ..
It’s like my second week of code learning and today i’ve found out that this is a good site for beginners to ask simple questions, so excuse me if i’m doing something wrong here. Anyways, i decided to make my own calculator in python without google searching and here’s what i’ve done: choice = input("Enter ..
I’m trying to make a simple calculator with python, however, the elif blocks are not executed and it skips to the else condition even though the other conditions are met. select=input("Please select an operation- n" "1. Add n" "2. Subtract n" "3. Multiply n" "4. Divide n") number1=input("Enter the first number: n") number2=input("Enter the second ..
[that’s the screshot of my image where I stuck. If you want to see my code you can check into my previous question I put my all code there .] https://drive.google.com/file/d/1FUhRz9C-7bge9CWjCYlIFZ_xIfF1XPU9/view?usp=drivesdk Source: Python..
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) ..
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__ ..