Is it possible to control the inlet Mach no. of the engine during flight?
The inlets of supersonic aircraft routinely control (reduce) the Mach number of the engine (at compressor inlet) during flight. This is done using either a 2D ramp type inlet (like Concorde) or a center body (like Mig-21).

These inlets convert the incoming supersonic flow to subsonic flow by forming shock waves in the path of the airflow. 



Source: sturgeonshouse.ipbhost.com

In subsonic conditions, the inlets perform two functions:


At cruise condition, diffusion of the free-stream flow to the compressor inlet condition.
At takeoff, acceleration of static air to the compressor inlet condition.


So basically, the inlet design can be optimized such that the Mach number is constant (within some variation) over the engine operational range. 

In your case, however, I think that it is a simplifying assumption made for the problem.