Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to make a complex calculator in python

Just Ctrl-C and Ctrl-V

num1 = float(input("Enter first number... "))
op = input("Enter an Operation... ")
num2 = float(input("Enter second number... "))
if op == ("+"):
    print(num1+num2)
elif op == ("-"):
    print(num1-num2)
elif op == ("*"):
    print(num1 * num2)
elif op == ("/"):
    print(num1/num2)
Comment

PREVIOUS NEXT
Code Example
Python :: python read live radio 
Python :: python iterate over object fields 
Python :: pandas where based another column 
Python :: plot python x axis range 
Python :: python dataframe get numeric columns 
Python :: main arguments python 
Python :: Set column as index with pandas 
Python :: rename a column in python 
Python :: import a txt file into python 
Python :: python merge csv files in same folder 
Python :: sorting pandas dataframe like excel 
Python :: python overwrite print on same line 
Python :: escape string for html python 
Python :: add time delta pytohn 
Python :: get certain columns pandas with string 
Python :: python file name from absolute path 
Python :: numpy set_printoptions 
Python :: python image to video 
Python :: how to install python 3.6 ubuntu 
Python :: python [a]*b means [a,a,...b times] v2 
Python :: python thread with parameters 
Python :: createview django 
Python :: python replace part in large file 
Python :: how to write to a file in python without deleting all content 
Python :: how to say hello world in python 
Python :: python df round values 
Python :: execute python in notepad++ 
Python :: add headers tp requests python 
Python :: how to add up a list in python 
Python :: select all columns except one pandas 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =