Hi, I'm very confused with my Python homework, and I have some troubles with it, any help is very appreciated. Thanks!

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

Hi, I'm very confused with my Python homework, and I have some troubles with it, any help is very appreciated. Thanks!

Post by answerhappygod »

Hi, I'm very confused with my Python homework, and I have some troubles with it, any help is very appreciated. Thanks!
Hi I M Very Confused With My Python Homework And I Have Some Troubles With It Any Help Is Very Appreciated Thanks 1
Hi I M Very Confused With My Python Homework And I Have Some Troubles With It Any Help Is Very Appreciated Thanks 1 (69.23 KiB) Viewed 49 times
In this problem, you are to create a Point class and a Triangle class. The Point class has the following data 1. x: the x coordinate 2. y: the y coordinate The Triangle class has the following data: 1. pts: a list containing the points You are to add functions/ methods to the classes as required bythe main program. Input This problem do not expect any input Output The output is expected as follows: 10.0 8. Main Program (write the Point and Triangle class. The rest of the main pro will be provided. In the online judge, the main problem will be automatical executed. You only need the point and Triangle class.) Point and Triangle class: In [1]: 1 main program: In [2] 1a = Point(-1,2) 2 b = Point(2 3 C = Point(4, -3) 4 St1- Triangle(a,b,c) 7 print(t1.area()) 9d-Point(3,4) 18 e Point(4,7) 11 f - Point(6,-3) 12 13 t2 - Triangle(d,e,f) 14 print(t2.area()) COC 2
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply