Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Python Expert

Project-

A printout showing the codes developed and outputs produced for the tests indicated. Deadline is strictly observed.

A. Implement a Triangle class in Python:

1. The triangle is defined by its three side lengths - a, b, and c.

2. The class includes methods that perform the following operations:

a. is_triangle - checks whether the given side lengths form a proper triangle;

b. area - returns the area of the triangle if properly formed; None otherwise;

c. perimeter - returns the perimeter of the triangle if properly formed; None otherwise;

d. a_angle, b_angle, c_angle - returns the vertex angle opposite to side a, side b, and side c, respectively, if the triangle is properly formed; None otherwise;

e. angles - returns the angles of the triangle;

f. __str__ - returns a string representation of a triangle object: side lengths, angles, perimeter, and area;

g. draw_triangle - draws a triangle of the given parameters using turtle. Test the Triangle class given the following data sets: (a, b, c) = (100, 100, 72), (100, 100, 100√2), (100, 50, 50).

B. Implement a Isosceles subclass of the Triangle class in Python:

1. The isosceles is defined by the side length - a - of the two equal sides and the angle formed by the two sides - angle -- in degrees.

2. The class includes or inherits methods that perform the following operations:

a. is_triangle - checks whether the given side lengths constitute a proper triangle;

b. area - returns the area of the triangle;

c. perimeter - returns the perimeter of the triangle;

d. a_angle, b_angle, c_angle - returns the vertex angle opposite to side a, side b, and side c, respectively;

e. angles - returns the angles of the triangle;

f. __str__ - returns a string representation of a triangle object: side lengths, angles, perimeter, and area;

g. draw_triangle - draws a triangle of the given parameters using turtle.

Test the Isosceles class given the following data sets: (a, angle) = (100, 72), (100, 90), (100, 60).

 C. Implement a PieChart class in Python:

1. The class includes or inherits a method that draws a pie chart of a given data set {(key, value)|1,2, . . ,n } using turtle:

a. The area of a slice of the pie chart is proportional to the percentage of an item value in the data set;

b. Each slice of the pie chart has a different color;

c. The pie chart has a legend that visually shows or relates the pie chart slices to their corresponding keys and values.

Test the PieChart class using the set of frequency of letters in "Words.txt" file -- {(letter, frequency)|1,2, . . ,n} -- you obtained in a previous exercise or project.

Python, Programming

  • Category:- Python
  • Reference No.:- M91775017
  • Price:- $90

Guranteed 48 Hours Delivery, In Price:- $90

Have any Question?


Related Questions in Python

Part i the assignment filesone of the most important

Part I: The Assignment Files One of the most important outcomes of this assignment is that you understand the importance of testing. This assignment will follow an iterative development cycle. That means you will write a ...

Architecture and system integrationcase study queensland

Architecture and System Integration Case Study: Queensland Health - eHealth Investment Strategy After evaluating various platforms, Queensland Health finally decided to adopt a Service Oriented Architecture (SOA) for its ...

Simple python traffic lightswrite a program that simulates

Simple Python (Traffic lights) Write a program that simulates a traffic light. The program lets the user select one of three lights: red, yellow, or green. When a radio button is selected, the light is turned on, and onl ...

Architecture and system integrationcase study queensland

Architecture and System Integration Case Study: Queensland Health - eHealth Investment Strategy After evaluating various platforms, Queensland Health finally decided to adopt a Service Oriented Architecture (SOA) for its ...

Question write a simple python program that takes use

Question: Write a simple python program that takes use inputs as non-zero digits and converts them into binary form. The response must be typed, single spaced, must be in times new roman font (size 12) and must follow th ...

Question research pythons dictionary data type dictdiscuss

Question : Research Python's dictionary data type (dict). Discuss its interface and usage. Include examples. Discuss practical applications of dictionaries.

Show times in tmus and seconds1 an associate grasps an oven

Show times in TMUs and seconds. 1. An associate grasps an oven door within reach and pulls it open 18 inches with the left hand (he does not relinquish control of the door). With a pan in the right hand, he carefully pos ...

Foundations of programming assignment - feduni bankingthis

Foundations of Programming Assignment - FedUni Banking This assignment will test your skills in designing and programming applications to specification. Assignment Overview - You are tasked with creating an application t ...

Tasksdemonstrate data scraping of a social network of

Tasks Demonstrate data scraping of a social network of choice. Develop technical documentation, including the development of the code & detailing the results. Provide a report on the findings, that includes research into ...

Assignment1 utilising python 3 build the following

Assignment 1. Utilising Python 3 Build the following regression models: - Decision Tree - Gradient Boosted Tree - Linear regression 2. Select a dataset (other than the example dataset given in section 3) and apply the De ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As