added while loop so programme continuously runs unless 'q' is entered as operator, also put proper validation on number inputs