Question: Using python, write code for problem. The text file Gifts.txt is used in this problem and i have pasted contents of the file. Please also
Using python, write code for problem. The text file Gifts.txt is used in this problem and i have pasted contents of the file. Please also put screenshot of your code.

1,partridge in a pear tree,207.68 2,turtle doves,62.50 3,French hens,60.50 4,calling birds,149.99 5,gold rings,150.00 6,geese-a-laying,60.00 7,swans-a-swimming,1000 8,maids-a-milking,7.25 9,ladies dancing,839.20 10,lords-a-leaping,534.82 11,pipers piping,239.56 12,drummers drumming,237.88
15. The 12 Days of Christmas Each year, PNC Advisors of Pittsburgh publishes a Christmas price index. See Table 5.2. rite a program that requests an integer from l through 12 and then lists the gifts for that day along with that day's cost. On the nth day, the n gifts are 1 partridge in a pear tree, 2 turtle doves, n of the nth gift. The program should also give the total cost up to and including that day. As an example, Fig. 5.21 shows the output when the user enters 3. The contents of Table 5.2, along with the day corresponding to each gift are contained in the file Gifts. txt. The first three lines of the file are as follows: 1, in a pear tree, 207.68 Partridge 2, turtle doves, 62.50 3, French hens, 60.50 TABLE 5.2 Christmas price index for 2014 Item Item Cost Cost partridge in a pear tree 207.68 000.00 Swan swimming turtle dove 62.50 maid-a-milking 7.25 French hen 60.50 lady dancing 839.20 calling bird lord a leaping 534.82 149.99 gold ring 150.00 239.56 piper piping goose a laying 60.00 drummer drumming 237.83 Enter a number from 1 through 12 3 The gifts for day 3 are 1 partridge in a pear tree 2 turtle doves 3 French hens Cost for day 3: $514.18 Total cost for the first 3 days: $1,054.54 FIGURE 5.21 Possible output of Exercise 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
