My solution for this task.
We need discriminant to be above zero, so we have:
p - 4q >= 0
p >= 4q
What is probability? It's relation of needed events to all. In this case needed events are all pairs (p,q) where p >= 4q
All events are all possible pairs (p,q)
How we can count them?
All possible pairs is Cartasian product. We can draw it like rectangle.
Its area - number of all possible pairs.
Also we need to find area of polygon, where p >= 4q.
For this let's draw line y=4x and needed set of points is above this line.
Our answer is relation between this area and area of whole rectangle.
I think finding areas isn't problem.
There is one case that I draw on second image, when 4b < a
There are 2 cases - when a=0 and b=0
When a=0 we have only left part of image, so answer is 0.5
When b=0 we have vertical line, so answer is 1.0
Sorry for some mistakes in English.