how to make a calculator using idle

Solutions on MaxInterview for how to make a calculator using idle by the best coders in the world

showing results for - "how to make a calculator using idle"
Mads
29 Mar 2020
1def calculate():
2    operation = input('''
3Please type in the math operation you would like to complete:
4+ for addition
5- for subtraction
6* for multiplication
7/ for division
8''')
9
10    number_1 = int(input('Please enter the first number: '))
11    number_2 = int(input('Please enter the second number: '))
12
13    if operation == '+':
14        print('{} + {} = '.format(number_1, number_2))
15        print(number_1 + number_2)
16
17    elif operation == '-':
18        print('{} - {} = '.format(number_1, number_2))
19        print(number_1 - number_2)
20
21    elif operation == '*':
22        print('{} * {} = '.format(number_1, number_2))
23        print(number_1 * number_2)
24
25    elif operation == '/':
26        print('{} / {} = '.format(number_1, number_2))
27        print(number_1 / number_2)
28
29    else:
30        print('You have not typed a valid operator, please run the program again.')
31
32    # Add again() function to calculate() function
33    again()
34
35def again():
36    calc_again = input('''
37Do you want to calculate again?
38Please type Y for YES or N for NO.
39''')
40
41    if calc_again.upper() == 'Y':
42        calculate()
43    elif calc_again.upper() == 'N':
44        print('See you later.')
45    else:
46        again()
47
48calculate()
queries leading to this page
how to make a calcultor in python using funtionpython 2f 2f on a calculartorhow to build a calulator in pythoncreate a calculator app with pythoncalculator pythonpython script for a calculatorhigh end calculator in python from scratchcalculator evolution idlepython calculator script examplepython tutorial how to build a calculatorbuild a calculator with pythonhow to know the ammount of calculations performed by python programhow to make a addition calculator in pythonalgorithm that reads in 2 integers and simulates multiplication using a loop and addition using pythonmaking a full working calculator in pytonhow to code calculator in pythonhow to make a muliple number calculater in pythonpython calculatorrun calculator pythonpython calculator programcode for calculator in pythonhow to make a calculator in python using functionscalculator app in pythonsimple calculator in python without functionpython calculator program using main functionarithmetic calculator in pythonpython code calculator with stepspython calculator project code pdfmaking calculator in pythonpython calculate 3fpython calculator codemaking a calculator in pythoncalculator script in pythonpython calculatorshow to make a calculator pythoncode for simple calculator in python without functionhow to build a calculator in pythonhow to make a calculator using idlepython how to make a calculatorcalculator idlewww building simple calculator with python videohow to make a python calculatorcalclator python codrhow to make a calculator with pythonbuild a calculator in pythonpython 3 course calculatorwrite a program that performs the tasks of a simple calculator the program should first take an integer as input and then based on that integer perform the task as given below write menu based program in python to create a four way calculatorpython calculate operation by secondmake a python calculatorhow to make calculator in pythonmake a calculator in python with defhow to make a calculator app in pythonvery basic python calculatorcalculator proggram script pythonmaking simple calculator with python with idlecalculator in python codehow to build a calculator simple calculator in pythonpython programs on calculatormake a custom form calculator pythoncalculation program in pythonbuilding a calculator in pythoncalculator in pythonpython for complete calculatorpython input calculator with operator1 create a calculator which can perform basic arithmetic operations depending upon the user input how to create a calculator in pythoncreate basic calculator pythonpython program for simple calculator input given from command prompthow to make python calculatecreate a calculator in python tutorialpython basic calculatorhow to do calculations with pythonhow to make a calculator in pythoncalculator programhow to make a calculator using idle