Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add rounding to 40_solar_system.py
Added the rounding bonus to this program, let me know if you want it as a separate bonus file.
  • Loading branch information
Ishan-Karpe authored Aug 11, 2025
commit 5e2cdd1dfc2c2c21db23cb2205b389cfb30db848
2 changes: 1 addition & 1 deletion 8-modules/40_solar_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@

planet_area = 4 * pi * radius * radius

print(f'Area of {random_planet}: {planet_area} sq mi')
print(f'Area of {random_planet}: {round(planet_area,1)} sq mi')