Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

UMBC Bar Chart Function Project

UMBC Bar Chart Function Project

UMBC Bar Chart Function Project

Description

Write a function called ‘bar_chart’ based on the following IPO specification:

# function:   bar_chart# input:      x & y value (integers), labels, values and colors (lists)# processing: draws a bar chart with the origin of the chart being at the x#             and y value supplied. the height of the chart will always be#             100 units, and the width of each bar in the chart can be#             computed as 50 units for each value in the 'values' list.#             draw two black lines to show these axes.##             the height of each bar should be proportionally scaled so that#             no bar ever ends up having a height of over 100 units.  for example,#             with the list [100,200,300] the third bar would be 100 units#             high, the second would only be ~66 units high and the first would#             be ~33 units high (values can be rounded and don't need to be exact)#             #             each value in the 'labels' list indicates the label for each bar#             in the bar chart.  these should be written below the x-axis#             using the 'turtle.write' function.  Ensure that these labels are#             spaced out accordingly (50 pixels for each bar)#             #             each bar should be drawn on top of the x-axis with a height defined#             in the 'values' list.  the color for each bar can be extracted#             from the 'colors' list.  the value of each bar should also be #             written at the top of each bar.# output:     function returns no value

Here is a sample program and its desired output to test your work:

import turtleturtle.setup(600,600)bar_chart(-200,-200,["pikachu"], [99999], ['yellow'])bar_chart(0,-200,["x","y","hello","world"], [1000,900,800,700], ['grey','pink','black','purple'])bar_chart(-200,0,["apple", "pear", "orange"], [100,200,300], ['red', 'green', 'orange'])bar_chart(0,0,["a","b","c","d","e"], [50,70,90,10,30], ['blue','pink','red','green','yellow'])

Some hints:

  • You don’t need to validate your data – the function will always be called with the correct arguments with the correct data types
  • The items in each list are related to each other by position (i.e. in the first list “apple” has a value of 100 and a color of ‘red’)
  • Refer back to Assignment #6B and our lecture on turtle graphics if you need help getting started with turtle. You are welcome to use any functions that you wrote for that assignment, including the ‘generic_polygon’ function.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20