Skip to content

Commit 2216499

Browse files
committed
Cleaned up unused variables in code
1 parent 4b664a3 commit 2216499

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

Advanced Calculator.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
num1 = ""
77
operator = ""
88
num2 = ""
9-
memStore = "EMPTY"
9+
memStore = "Empty"
1010

1111
# Define Function Listing Function
1212
def abilitiesList():
@@ -47,7 +47,6 @@ def askForInput(textPrompt):
4747
# Catch the exception if it is not a number
4848
print("ERROR: Syn: Invalid Num")
4949
else:
50-
# Else, move on
5150
# Typecasting
5251
return float(num)
5352

@@ -62,25 +61,17 @@ def askForInput(textPrompt):
6261
# Is operator == to any of out constants or predefines?
6362
if operator == "help":
6463
abilitiesList()
65-
operator = ""
6664
elif operator == "pi":
6765
print(math.pi)
68-
operator = ""
6966
elif operator == "e":
7067
print(math.e)
71-
operator = ""
7268
elif operator == "tau":
7369
print(math.pi*2)
74-
operator = ""
7570
elif operator == "MR":
7671
print(str(memStore))
77-
operator = ""
7872
elif operator == "M-":
7973
memStore = "Empty"
8074
print("Memory Cleared")
81-
operator = ""
82-
elif operator == "M+":
83-
num2 = "0"
8475
elif operator == "rand":
8576
print(random.random())
8677
# Has the user entered in a valid operator?

0 commit comments

Comments
 (0)