Write a program that accepts the lengths of three sides of a triangle as inputs. The program output should indicate whether or not the triangle is an equilateral triangle. (This is used on Python)

Note: The code has been provided for both python 3 and python 2.7.
For python3:
Code Screenshots:
https://media.cheggcdn.com/media/290/2902aa1a-87af-4636-abbc-f03f152ff743/phpgeTmxI.png
https://media.cheggcdn.com/media/4b4/4b4e4268-2872-4ff0-9c91-8c2213ee28f3/phpRjny5Z.png
Code To Copy:
#Define the main() function.
def main():
#Get the length of the first
#side of the triangle.
side1 = float(input(“Enter the first side: “))
#Get the length of the second
#side of the triangle.
side2 = float(input(“Enter the second side: “))
#Get the length of the third
#side of the triangle.
side3 = float(input(“Enter the third side: “))
#If the length of all the sides is equal then,
#the triangle is an equilateral triangle.
if side1 == side2 == side3:
print(“The triangle is an equilateral triangle.”)
#Otherwise, the triangle is not
#an equilateral triangle.
else:
print(“The triangle is not an equilateral triangle.”)
#Call the main() function.
main()
For python 2.7:
Code Screenshots:
https://media.cheggcdn.com/media/1d0/1d09a4fd-3c79-4bdb-8c92-d0698eb720a6/phpd9KSWZ.png
https://media.cheggcdn.com/media/b7f/b7fe5306-56cb-40f2-933b-e438e5d324aa/phpLrvRiY.png
Code To Copy:
#Define the main() function.
def main():
#Get the length of the first
#side of the triangle.
side1 = input(“Enter the first side: “)
#Get the length of the second
#side of the triangle.
side2 = input(“Enter the second side: “)
#Get the length of the third
#side of the triangle.
side3 = input(“Enter the third side: “)
#If the length of all the sides is equal then,
#the triangle is an equilateral triangle.
if side1 == side2 == side3:
print “The triangle is an equilateral triangle.”
#Otherwise, the triangle is not
#an equilateral triangle.
else:
print “The triangle is not an equilateral triangle.”
#Call the main() function.
main()
 
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"