Boolean24. The numbers A, B, C are given (the number A is not 0). After examining the discriminant \(D = B^2 - 4 \cdot A \cdot C \), check the truth of the statement: "The quadratic equation \(A \cdot x^2 + B \cdot x + C = 0\) has real roots".

Solution in Python 3:

import numpy as np
import random

A = random.randint(1,10)
B,C = list(np.random.choice(range(1, 11), 2))
print("A = {0}, B = {1}, C = {2}".format(A,B,C))

D = B*B - 4*A*C

x = (D >= 0)
print("Discriminant:",D)
print("The quadratic equation {0}x^2 + {1}x + {2} = 0 has real roots: ".format(A,B,C), x)