logo

IPO Chart: Input Phone Number Process

This assignment requires students to demonstrate their understanding of programming concepts and problem-solving skills by providing solutions to four questions.

5 Pages626 Words376 Views
   

Added on  2023-04-23

IPO Chart: Input Phone Number Process

This assignment requires students to demonstrate their understanding of programming concepts and problem-solving skills by providing solutions to four questions.

   Added on 2023-04-23

ShareRelated Documents
Q no 1 Answer:
IPO Chart:
Input Process Output
Phone number Get phone number from user Country name
Extract the country code from
the phone number
Identify the country using the
country code
Display the country name
Q no 2 Answer:
Pseudo code:
Mobile_Usage //Main algorithm for determining the mobile use and display warning message
Get mobile_usage_in_min
//Checking if mobile_usage_in_min is less than 1 hour (Since 1 hour is equal to 60 minutes)
IF mobile_usage_in_min < 60 THEN
DISPLAY "Usage is acceptable"
//Checking if mobile_usage_in_min is greater than or equal to 1 hour and less than 2 hours
ELSE IF 60 <= mobile_usage_in_min && mobile_usage_in_min < 120
DISPLAY "Mediocre Usage"
//Checking if mobile_usage_in_min greater than 2 hours or not
ELSE IF 120 < mobile_usage_in_min
DISPLAY "Warning, using your phone more than 2 hours per day can affect your health"
ENDIF
END
Q no 3 Answer:
Pseudo code:
//Main Algorithm to read data from a file, Calculate ticket price and write to another file
Calculate Zoo_Ticket_Price
Initialise
Write_Headings
IPO Chart: Input Phone Number Process_1
REPEAT
Read_Input
Calculate_Price
Write_to_File
UNTIL EOF
Finalisation
END
//Initialising the variables and opening the files
Initialise
OPEN Family_Info.xlsx
OPEN Ticket_Prtice.xlsx
family_name = ""
number_of_adults = 0
number_of_teenagers = 0
number_of_children = 0
number_of_infants = 0
total_ticket_price = 0
adults_ticket_price = 37
teenagers_ticket_price = 25
children_ticket_price = 18
END
//Writing headings in Ticket_Prtice.xlsx file
Write_Headings
WRITE "Family Name, Total Ticket Price” TO Ticket_Prtice.xlsx
END
//Reading inputs from Family_Info.xlsx file
Read_Input
READ family_name, number_of_adults, number_of_teenagers, number_of_children,
number_of_infants FROM Family_Info.xlsx
END
IPO Chart: Input Phone Number Process_2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Thinking Technology and Design - Program Algorithms and Pseudocode
|6
|694
|181

Pseudo Code Solutions
|5
|1038
|420