OUTPUT Of Python C.ode num=float(input("enter a real number :"))
tnum=int(num)
rnum=round(num)
print("number :",num,"_converted to integer in 2 ways as :",tnum," and :",rnum)
rnum2=round(num,3)
print("number",num,"roundedoff to 3 places after decimal is :",rnum2)
Share
0 Replies