Advertisement
here2share

# fun_fact_about_buying_pizza.py

Jun 10th, 2024
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. # fun_fact_about_buying_pizza.py
  2.  
  3. import math
  4.  
  5. # Radius of the pizzas
  6. radius_18 = 18 / 2
  7. radius_12 = 12 / 2
  8.  
  9. # Area calculations
  10. area_18 = math.pi * (radius_18 ** 2)
  11. area_12 = math.pi * (radius_12 ** 2)
  12.  
  13. # Comparison
  14. print("Area Size of 2 12inch Pizzas =", int(area_12 * 2))
  15. print("Area Size of an 18inch Pizza =", int(area_18))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement