There are two math functions,math.ceil(x)andmath.floor(x).math.ceil()finds the next integer larger thanxandmath.floor(x)find the next integer smaller thanx.Write some code that reads a number from the keyboard, using a line like

x=input(). Then, using themath.ceil()andmath.floor()functions, properly round the number (inx) to the nearest integer. So 4.5 should round to 5 and 4.3 should round to 4, etc. Your code should display the rounded number to the screen usingYou might have to experiment with

math.ceil(x)andmath.floor(x)a bit first. Try, for exampleprint(math.ceil(5.3))orprint(math.floor(5.3)). In your math book, these will be called the "greatest" and "least" integer functions.

See your results here: