Write a Python program to play the 24 Game. Please see
for the game description. Specifically, your program needs to do the following:
Randomly generate 4 integers in the interval [1, 13].
Use these 4 numbers as input for a 24 Game and solve it in two cases:
1. return a single solution for the input; and
2. return all solutions;
For instance, given numbers (6, 1, 6, 9), your program should find solutions including
((9 − 6) + 1) × 6,
which you can represent as:
Input: [6, 1, 6, 9]
Found Solution: (9sub6); (3add1); (4mul6).
Record the processing time for both cases.
Generalise your program so it takes N (N ≥ 4) integers from the interval [a, b], where 0 ≤ a ≤ b,
and produces an integer M. Analyse the performance of your program with respect to parameters
a, b, N and M.