|
@ -14,6 +14,7 @@ def is_allowed_string(type, value): |
|
|
allowed = "+-*/()^" |
|
|
allowed = "+-*/()^" |
|
|
return all(character.isdigit() or character in allowed for character in value) |
|
|
return all(character.isdigit() or character in allowed for character in value) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def calculate_string(string): |
|
|
def calculate_string(string): |
|
|
string = string.replace('^', '**') |
|
|
string = string.replace('^', '**') |
|
|
try: |
|
|
try: |
|
|