microsoft / Mastering-GitHub-Copilot-for-Paired-Programming

An 8 Lesson course teaching everything you need to know about harnessing GitHub Copilot and an AI Paired Programing resource.
MIT License
4.74k stars 782 forks source link

Ok #34

Open leeo67 opened 2 months ago

leeo67 commented 2 months ago

def hexagon_properties(side_length):

Calculate the area of the hexagon

area = (3 * math.sqrt(3) * (side_length ** 2)) / 2

# Calculate the perimeter of the hexagon
perimeter = 6 * side_length

return area, perimeter

side_length = float(input("Enter the side length of the hexagon: ")) area, perimeter = hexagon_properties(side_length)

print("The area of the hexagon is: ", area) print("The perimeter of the hexagon is: ", perimeter)