Storing the rounded value back

Predict the output · Basic · §5.4 Floats are approximations

The code rounds an average star rating. Predict the output without running the code.

Code

avg = 4.256
round(avg, 2)
print(avg)
avg = round(avg, 2)
print(avg)
print(f"{avg:.1f}")
print(avg)

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.