Create a program in Python, called TA_Calculator, that uses a function to calculates the area of a triangle given the base and height measurements. Use the below function to do your calculation: added in images The program should receive the base and the height from the user. Once the user enter a base greater than the height the program should give the user another attempt to enter a base and a height. The program only give the user three attempts to enter the correct base and height on the third attempt the program should display the below message: “You have exhausted your 3 attempts please try again later” If the user enter a base less than height, the program should display the correct triangle area using the given function. Hint: You should use a function, a loop, an if statement, a sentinel value,

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question
100%

Create a program in Python, called TA_Calculator, that uses a function to calculates the area of a triangle given the base and height measurements. Use the below function to do your calculation: added in images
The program should receive the base and the height from the user. Once the user enter a base greater than the height the program should give the user another attempt to enter a base and a height. The program only give the user three attempts to enter the correct base and height on the third attempt the program should display the below message:
“You have exhausted your 3 attempts please try again later”

If the user enter a base less than height, the program should display the correct triangle area using the given function.
Hint: You should use a function, a loop, an if statement, a sentinel value,

def area_of_triangle (base, height):
return 0.5 • base • height
Transcribed Image Text:def area_of_triangle (base, height): return 0.5 • base • height
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT