Python Programming - Console Input/Output - Discussion
Discussion Forum : Console Input/Output - General Questions (Q.No. 54)
54.
How can you prompt the user to enter a floating-point number and round it to the nearest integer?
Answer: Option
Explanation:
To prompt the user to enter a floating-point number and round it to the nearest integer, use
round(float(input("Enter a number: ")))
.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers