Gains and Losses
Draw a bar chart of values by name in which every bar that is 0 or more is "green" and every bar below 0 is "red". Return the figure.
Checked: the bars and the bar colors.
Example 1
names ["tea","milk","jam"]
values [3,-5,2]
draws

Constraints
1 <= len(names) == len(values) <= 10- The names are all different
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More matplotlib problems
- Grid and LegendEasy
- Growth on a Log ScaleEasy
- Label the PeakEasy
- Mark the AverageEasy
- Names on the AxisEasy
- Side by SideEasy
- Zoom InEasy
- Bars in PairsMedium