Question: Complete the following tasks related to file using Python programming. ( a ) Create a file phoneLog . txt with at least 5 0 0
Complete the following tasks related to file using Python programming.
a Create a file phoneLogtxt with at least records. This file should contain the following
fields:
day number, this represents the day number of the month and must be an integer value.
phone number, this should contain digits and must be stored in a character array.
call duration in minutes this should be an integer value.
Status, this represents the incoming or outgoing call, use for incoming and for outgoing.
Note: User input is not required, the data should be randomly generated.
b Display a menu with the following options:
Display all records this should display entire file in a tabular form with headings in first row
Total number of minutes this option should display the total minutes used in this month
Distribution of minutes this should display the total number of minutes for incoming and outgoing calls
Total number of minutes used on a particular day this option should ask the user to enter the day number and display the total number of minutes used on that day. For
example, if user enters day this option should sum all minutes used on day
Phone number starts with area code this option should ask the user to enter the area code such as and displays complete record of all phone number matching
given area code.
Test your program by first creating a file in a and then selecting menu options through
Note: Assuming number of records is unknown. All above options must be completed
using functions. Use a class to model your data with the appropriate instance variables and methods.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
