Python Taskbook Level 10.6

Задание 1

Make a script that generates quadratic equations with integer roots.

Задание 2

Given a string containing any number of nested paired parentheses, write code that will check that the parentheses are positioned correctly.

This is correct:

python'()()'

This is correct:

python'(())'

This is incorrect, since the number of open brackets does not match the number of closed ones:

python'())'

This is incorrect, because although the number of open brackets matches the number of closed ones, they are in the wrong order:

python'))(('