Instructions Modify the program from Project 4 to compute the area of a triangle. triangle.py 1 # Edit the code below (f

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Instructions Modify the program from Project 4 to compute the area of a triangle. triangle.py 1 # Edit the code below (f

Post by answerhappygod »

Instructions Modify The Program From Project 4 To Compute The Area Of A Triangle Triangle Py 1 Edit The Code Below F 1
Instructions Modify The Program From Project 4 To Compute The Area Of A Triangle Triangle Py 1 Edit The Code Below F 1 (45.08 KiB) Viewed 86 times
Instructions Modify the program from Project 4 to compute the area of a triangle. triangle.py 1 # Edit the code below (from Project 4) 2 base = float(input("Enter the base:5 ")) 3 height = float(input("Enter the height:7 ")) 4 area = base 34* height 67 5 print("The area is", area, "square units.") 6 7 1. Issue the appropriate prompts for the triangle's base and height and change the name of the width variable to base. 2. Use the formula 0.5 * base height to compute the area. An example of the program input and output is shown below: Enter the base: 5 Enter the height: 7 The area is 17.5 square units. Grading When you have completed your program, click the Submit button to record your score.

+ Tasks + >_ Terminal Program produces correct output given input 0.00 out of 10.00 triangle.py 1 # Edit the code below (from Project 4) 2 base = float(input("Enter the base:5 ")) 3 height = float(input("Enter the height:7 ")) 4 area = base 34+ height 67 5 print("The area is", area, "square units.") 6 7 O out of 3 checks passed. Review the results below for more details. Checks > Test Case • Incomplete Test for base of 5. height of 7 > Test Case Incomplete Test for base of 34, height of 67 > Test Case Incomplete Test for base of 127. height of 15 Rename the width variable to base 10.00 10.00 2 out of 2 checks passed. Great work!
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply