Skip to content

Commit e0b0822

Browse files
committed
Fixed implicit multiplication 2
1 parent 052d196 commit e0b0822

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

final_task/pycalc/calc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ def correct_expression(expression):
159159
re_expr.insert(i, '*')
160160
elif re_expr[i] in constants and re_expr[i - 1] in constants:
161161
re_expr.insert(i, '*')
162+
elif (re_expr[i] in constants or re_expr[i] in ops_list) and is_float(re_expr[i - 1]):
163+
re_expr.insert(i, '*')
162164
return re_expr
163165

164166

0 commit comments

Comments
 (0)