Starting from:
$35

$29

Final project Solution

Write a Python program that draws a pie chart of the n most frequent letters in "Wordstxt" file. The program will:
    a. Use Tldnter to build an interface to input the number of letters, n, in the pie chart;
    b. Have a module imported that determines the probability of letters in "Words.txt" file:
Probability of letter —
E Frequencies of all letters
c    Use Turtle to draw the pie chart:
i.        Area of each segment of the pie chart is proportional to the probability of the 
corresponding letter:
Probability of letter
2ir
    ii. Each segment has a different color;
    iii. Each segment has a legend showing the letter and its probability;
    iv. The last segment represents "All Other Letters" and their cumulative probability. In the graph below, the probability of All Other Letters is one minus the sum of the probabilities of letters e, s, and i;

Mateo. leSers.0 7002
    v. Nag:
Beware! Using graph tools or packages to draw the pie chart will not be considered an acceptable solution.

More products