Draft

Off By One Product Expressions

Description:

In this kata, you will be given an incorrect mathematical expression consisting of products and will have to correct it using your implementation of fix_expression.

The expressions themselves will have one error, where one number provided is off by one from its intended value (7 would be given to you as 6 or 8). This will invalidate an otherwise correct expression, and you are to find which number is wrong, and in what direction it is incorrect.

For example, if your function is given '3*2=5', it should correct the right side of the expression to be 6, validating the expression and returning '3\*2=6'. Each test case will have only one number off by one, and only one valid solution. Both sides may be expressed as products ('4*3=6*1') and either side may contain the error.

Stats:

CreatedMar 2, 2018
Warriors Trained9
Total Skips0
Total Code Submissions0
Total Times Completed1
Python Completions1
Total Stars0
% of votes with a positive feedback rating0% of 0
Total "Very Satisfied" Votes0
Total "Somewhat Satisfied" Votes0
Total "Not Satisfied" Votes0
Ad
Contributors
  • STXplore Avatar
Ad