LearnPy Hub
← Matplotlib Charts problems
Hard

Pie Chart Percentages

Read labels and values. Draw ax.pie(values, labels=labels, autopct='%1.1f%%', startangle=90). Print the percentage texts in order on one line, then the label of the largest slice, then the angle (in degrees, 1 decimal) where the first wedge ends, using wedges[0].theta2.

Input

Labels, then values.

Output

Three lines.

Sample 1

Input
Food Rent Travel
50 30 20
Output
50.0% 30.0% 20.0%
Food
270.0

Sample 2

Input
Only
7
Output
100.0%
Only
450.0
solution.py
Output appears here
Pie Chart Percentages · Python practice problem · LearnPy Hub