adpkg

A package containing Python mo...
Log | Files | Refs | README | LICENSE

test4.py (839B)


      1 from adpkg.triangle import areaoftriangle
      2 
      3 if __name__ == '__main__':
      4     print("--- Triangle Area Calculator ---")
      5     
      6     while True:
      7         try:
      8             side_a = input("Enter the length of side a: ")
      9             side_b = input("Enter the length of side b: ")
     10             side_c = input("Enter the length of side c: ")
     11             
     12             area = areaoftriangle(side_a, side_b, side_c)
     13             
     14             if area is not None:
     15                 print(f"The calculated area of the triangle is: {area}")
     16             
     17         except Exception as e:
     18             print(f"An error occurred during input: {e}")
     19             
     20         check_again = input("\nDo you want to calculate another area? (yes/no): ").lower()
     21         if check_again != 'yes':
     22             break
     23 
     24     print("Exiting calculator. Goodbye!")
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror