In all cases where a city of the primary class, city of the first class, city of the second class, or village has entered into a contract for paving or otherwise improving a street or streets, or for the construction or improvement of a system of waterworks or sanitary or storm sewers, and the contract has not been completed on account of any order or regulation issued by the United States or any board or agency thereof, such city or village may accept that part of the work which has been completed, levy special assessments and taxes, and issue bonds to pay the cost of the work so completed and accepted, in the same manner and on the same conditions as if such contract had been fully completed.