#### Category : calculator

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 ..