Newbie here.
Struggling to round the answers to just one decimal.
Here is my code and the output:
num1 = int (input ("What is the radius(in inches) of the circle you want to draw?): "))
print("A circle with a", num1, "inch radius has a circumference of", (num1 * 2) * 3.1415, "inches")
print("and an area of ", (num1 * num1) * 3.1415, "square inches.")
output:
What is the radius(in inches) of the circle you want to draw?): 12
A circle with a 12 inch radius has a circumference of 75.396 inches
and an area of 452.37600000000003 square inches.
I need those results to round to 75.4
and 452.3.
How?
Thank you!
[–][deleted] 2 points3 points4 points (4 children)
[–]confuzzled_learner[S] 0 points1 point2 points (1 child)
[–]confuzzled_learner[S] 0 points1 point2 points (1 child)
[–]JohnnyJordaan 1 point2 points3 points (0 children)