1. Please answer the following questions based on information (month and interest rate)
given below:
jun = 6.55
jul = 6.65
aug = 5.92
sep = 5.75
oct = 5.89
Create and output a list of interest rates.
a)
b) Build and output the list such that it contains the appropriate keys: June, July,
August, September, October.
c) Output the information for July (both key and value).
d) Output the information for the first three months.
e) Output the information for the last two months.
f) Correct the interest rate for September (5.79). Output the corrected list.
g) Add and output information to the list for November with an interest rate of
6.25.
2. Write a for loop that iterates over a s_list and appends each number squared to
list_squared. Sort and reverse this list.
s_list = [7, 6, 4, 2, 1, 5, 3]
3. Objectives of question 3:
1) Open a regular file for reading
2) Using splicing to extract data fields from records in the text file
Write a program to extract data in the record format shown below from the attached
text file "zinctelecom.txt" and output the contents of the records to screen.
Field Name. Field Length
Originating number 11 characters
Date 6 characters
Time. 4 characters
Duration. 5 characters
Call type. 4 characters
Destination number 11 characters
Time band. 2 characters
(zinctelecom.txt file)
96645786900010920100000001SMS 12462921927DY
2463215478030920233000001GPRS02488975647EV
17673427654120420010003600VOIC13459872341WN
23409304831230520090000001SMS 7582349856WN
18450673422030092192700001GPRS21345678310EV
01155984611310720123007200VOIC12464207921DY
01191738363040720175501768VOIC18683453928DY
2468921124150820234000001SMS 02737349725DY
17589343273010820023000001GPRS17589013673EV
12867342212291020054300861VOIC19633456723HL