Reverse Engineer

Reverse Engineer

Challenging
English

You are standing next to a math machine which takes two numerical inputs x and y , and has a single numerical output. It is known that the machine evaluates an expression using x , y , the operators + – * / and brackets . You should recover the expression by using the machine and the inputs of your choice over several turns. x , y and the result you receive are integers. The machine uses real division( / ) in the expression. When dividing by zero, the result will evaluate to "ZeroDivisionError" .

Equivalent expressions will be accepted by the grader. For this the machine evaluates your expression and the hidden expression several times using random values.

In each step your function gets a list with data from the past steps. Each element is a list of three numbers -- x (int), y (int) and output (a fraction as a list or the string "ZeroDivisionError"). The output is represented as a list with two integers - numerator and denominator.

The function...

You should be an authorized user in order to see the full description and start solving this mission.
26
Settings
Code:
Other:
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

pip3 install checkio_client

Configure your tool

checkio --domain=py config --key=

Sync solutions into your local folder

checkio sync

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

checkio serv -d

Alternatevly, you can install Chrome extension or FF addon

checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.

×
 
 
<< <
> >>
exec show

Whats Next?

Free accounts will see Best CheckiO solutions with some delay.
Best Solutions will be opened in a moment
Become Awesome and Don't wait
The next stage is ""
Will be activated in
View More Solutions Random Review Solutions Go to the next mission