A piecewise function is a function that is defined by multiple sub-functions, each sub-function applying to a certain interval of the main function's domain (a sub-domain)
The three sub-functions are ;
y = 6
y = 3
y = 5
These three functions exist at a certain domain on the x-axis as shown.
From the graphs shown, the one that represents the piecewise function given is the first graph on the left.
It is shown below;