@@ -8,8 +8,6 @@ def supercommand():
88 command = input ().strip ().lower ()
99 if command == "" :
1010 continue
11- elif command == "superpmdm" :
12- superpmdmcalc ()
1311 elif command == "supertype" :
1412 typed_text = input ("Type something:" )
1513 print (typed_text + typed_text )
@@ -44,7 +42,7 @@ def supercommand():
4442 print ("No such command in supermode." )
4543 else :
4644 print ("PyTerm error: wrong password." )
47- # PMDMcalc integrated with PyTerm, and even more powerful version for the supermode, SUPERPMDMcalc!
45+ # PMDMcalc integrated with PyTerm but with a little bit strange code.
4846def pmdmcalc ():
4947 operation = input ("PMDMcalc is welcomming you! hint: + - / *. Type the symbol here: " ).strip ()
5048
@@ -70,50 +68,6 @@ def pmdmcalc():
7068
7169 else :
7270 return "Your symbol is not supported in PMDMcalc. Please try again with another symbol."
73- def superpmdmcalc ():
74- operation = input ("SUPERPMDMcalc is welcoming you! hint: + - / * or < = >. Type the symbol here: " ).strip ()
75-
76- if operation in ["+" , " +" ]:
77- num1 = float (input ("Number 1: " ))
78- num2 = float (input ("Number 2: " ))
79- num3 = float (input ("Number 3: " ))
80- return f"Result: { num1 + num2 + num3 } "
81-
82- elif operation in ["-" , " -" ]:
83- num1 = float (input ("Number 1: " ))
84- num2 = float (input ("Number 2: " ))
85- num3 = float (input ("Number 3: " ))
86- return f"Result: { num1 - num2 - num3 } "
87-
88- elif operation in ["/" , " /" ]:
89- num1 = float (input ("Number 1: " ))
90- num2 = float (input ("Number 2: " ))
91- num3 = float (input ("Number 3: " ))
92- if num2 == 0 or num3 == 0 :
93- return "Error: Division by zero."
94- return f"Result: { num1 / num2 / num3 } "
95-
96- elif operation in ["*" , " *" ]:
97- num1 = float (input ("Number 1: " ))
98- num2 = float (input ("Number 2: " ))
99- num3 = float (input ("Number 3: " ))
100- return f"Result: { num1 * num2 * num3 } "
101-
102- elif operation in ["<" , " <" , ">" , " >" ]:
103- num1 = float (input ("Number 1:" ))
104- num2 = float (input ("Number 2:" ))
105- if operation .strip () == "<" :
106- return str (num1 < num2 )
107- elif operation .strip () == ">" :
108- return str (num1 > num2 )
109-
110- elif operation == "=" :
111- num1 = float (input ("Number 1:" ))
112- num2 = float (input ("Number 2:" ))
113- return str (num1 == num2 )
114-
115- else :
116- return "Your symbol is not supported in SUPERPMDMcalc. Please try again with another symbol."
11771
11872# All commands are in this handle_command() tag.
11973def handle_command (command ):
0 commit comments