In: Computer Science
-Draw a flowchart and pseudocode for a program that produces a monthly bill for a cell phone customer.
-List at least 10 separate modules that might be included. - For example, one module might calculate the charge for daytime phone minutes used. -
-Make a working version of this program using Python.
Need all of the above answered including the correct code for program using python
The question first of all requires 10 separate modules involved in producing monthly cell phone bill. The following image lists 10 different parts of cell phone bill.
For each of the module, the flowchart will contain a condition if the charges for each module is applicable or not. If they are applicable, add to overall cost else ignore that. For all modules, we will check a condition. Following image shows flowchart of 3 modules.
Pseudocode for 2 modules is shown and for other modules, similar code can be added.
The screenshot of working python code along with the code in text format is added below. The charges for each module are known previously and for each customer different inputs are taken based on his/her usage.
Text format :
total_monthly_bill = 0
monthly_call_minutes = float(raw_input("Enter monthly daytime
call minutes : "))
call_minute_charge = 0.1
total_monthly_bill += monthly_call_minutes * call_minute_charge
monthly_sms = float(raw_input("Enter number of sms sent :
"))
sms_charge = 0.5
total_monthly_bill += monthly_sms * sms_charge
monthly_data = float(raw_input("Enter monthly data consumed in
Kb : "))
data_charge = 0.1
total_monthly_bill += monthly_data * data_charge
monthly_caller_subsription_charges = float(raw_input("Enter
monthly caller subsription charges : "))
total_monthly_bill += monthly_caller_subsription_charges
monthly_night_call_minutes = float(raw_input("Enter monthly
nighttime call minutes : "))
call_minute_charge = 0.05
total_monthly_bill += monthly_night_call_minutes *
call_minute_charge
monthly_international_call_minutes = float(raw_input("Enter
monthly international call minutes : "))
call_minute_charge = 2
total_monthly_bill += monthly_international_call_minutes *
call_minute_charge
monthly_national_call_minutes = float(raw_input("Enter monthly
national call minutes : "))
call_minute_charge = 1
total_monthly_bill += monthly_national_call_minutes *
call_minute_charge
monthly_call_forwarding_charges = float(raw_input("Enter monthly
call forwarding charges : "))
total_monthly_bill += monthly_call_forwarding_charges
monthly_validity_extension_charges = float(raw_input("Enter
monthly validity extension charges : "))
total_monthly_bill += monthly_validity_extension_charges
monthly_game_subscription_charges = float(raw_input("Enter
monthly game subsription charges : "))
total_monthly_bill += monthly_game_subscription_charges
print("The total monthly bill is " + str(total_monthly_bill))