subject

5.2.4: Area of Triangle Write a function that computes the area of a triangle given its base and height.

The formula for an area of a triangle is:

AREA = 1/2 * BASE * HEIGHT

For example, if the base was 5 and the height was 4, the area would be 10.

triangle_area(5, 4); # should print 10

Your function must be named triangle_area

Note: Be sure to include comments for all functions that you use or create.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
You have a large, late-model pick-up truck with a rear seat. the pick-up truck weighs 6,500 pounds. the florida seat belt law
Answers: 1
question
Computers and Technology, 22.06.2019 18:10
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Which of the following commands is more recommended while creating a bot?
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
You know the right answer?
5.2.4: Area of Triangle Write a function that computes the area of a triangle given its base and he...
Questions
question
Spanish, 17.10.2019 04:00
Questions on the website: 13722363