Specify a problem Formulate an algorithm for the problem Realise the algorithm into a program Computer and Information Technology for (HKCEE) Module A2: Part C 9. Solving Programming Problems Case Study 1 problem definition: input the ages which are less than 12 Calculate and print the average age First-level pseudocode 1. 2. 3. 4. Get input Record number input Perform computations 3. Sum up input value 3. Average the sum obtained 4. Display result in a real number.
Specify a problem Formulate an algorithm for the problem Realise the algorithm into a program Computer and Information Technology for (HKCEE) Module A2: Part C 9. Solving Programming Problems Case Study 1 problem definition: input the ages which are less than 12 Calculate and print the average age First-level pseudocode 1. 2. 3. 4. Get input Record number input Perform computations 3. Sum up input value 3. Average the sum obtained 4. Display result in a real number.
Direitos autorais:
Attribution Non-Commercial (BY-NC)
Formatos disponíveis
Baixe no formato PPT, PDF, TXT ou leia online no Scribd
Specify a problem Formulate an algorithm for the problem Realise the algorithm into a program Computer and Information Technology for (HKCEE) Module A2: Part C 9. Solving Programming Problems Case Study 1 problem definition: input the ages which are less than 12 Calculate and print the average age First-level pseudocode 1. 2. 3. 4. Get input Record number input Perform computations 3. Sum up input value 3. Average the sum obtained 4. Display result in a real number.
Direitos autorais:
Attribution Non-Commercial (BY-NC)
Formatos disponíveis
Baixe no formato PPT, PDF, TXT ou leia online no Scribd
Second-level pseudocode 1. Get data 1.1 Input data value <12 2. Record number input 3. Perform computations 3.1 Sum up input value 3.2 Average the sum obtained 4. Display result in a real number
Computer and Information Technology for (HKCEE) Module A2: Part C
9.1 Solving Programming Problems
Case Study 2 Problem definition: Calculate the future value using the formula future value = loan * (1 + interest rate) ^ number of year First-level pseudocode 1. Get data 2. Perform computations 3. Display results in two decimal places
Computer and Information Technology for (HKCEE) Module A2: Part C
9.1 Solving Programming Problems
Second-level pseudocode 1. Get data 1.1 Get loan 1.2 Get number of year 2. Perform computations 2.1 future value = loan * (1+interest rate) ^ number of year 3. Display results in two decimal places
Computer and Information Technology for (HKCEE) Module A2: Part C
9.1 Solving Programming Problems
Case Study 3 Problem definitions: Convert a line of letters into cryptograms based upon: Letter from A to N: new_letter := chr(ord(‘original_letter’) – 15); Letter from O to Z: new_letter := chr(ord(‘original_letter’) + 30);
Computer and Information Technology for (HKCEE) Module A2: Part C
9.2 Solving the Same Problem
Using Different Algorithms Guidelines of choosing the best algorithms easy to understand the algorithm, program it and debug it minimize the programming effort apply on the computer resources efficiently (time & space)