Question
It is a python code 2) For this final question, your task is to find the formula for a simple geometric problem using Google and
It is a python code
2) For this final question, your task is to find the formula for a simple geometric problem using Google and then implement that formula in Python. While you may think that it is silly that we don't just give you the formula, scripting in Python often requires one to do a substantial amount of searching for information. This question requires you to practice this important task.
Write a Python function that computes the area of an equilateral triangle given the length of one of its sides. Search for a mathematical formula that specifies this relation and translate that formula into Python. Hint: The desired formula involves taking a square root. Remember that you compute a square root of a number in Python by raising that number to the 0.5 power using the ** operator.
As a test, your area function should return an area of 1.73205080757 for an equilateral triangle with sides of length 2. Now, use this function to compute the area of equilateral triangle with sides of length 5. Enter this area as a number (and not the units) with at least four digits of precision after the decimal point.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started