Writing and amending algorithms
66 past-paper questions on Writing and amending algorithms · examined 2020–2025.
20258 questions
Write an algorithm using pseudocode to input the telephone number, extract the 2-digit country code, output the matching country, output ‘Unknown’ if there is no matching country.
Explain how you could change the algorithm to repeatedly prompt for the telephone number until the number entered is 13 characters in length.
State the purpose of each of the library routines MOD and DIV. Give one example pseudocode statement for each.
Explain how the flowchart can be changed to produce the correct output.
Explain how you could improve the algorithm so that the search is more likely to find the required results.
Write the pseudocode for an algorithm that will allow an email address to be input and check whether or not it contains an @ symbol.
Write the pseudocode required to declare and initialise the array CodeStore[]
Explain how you could change the corrected algorithm so that it will also: • find the height of the tallest person. • output the height of the tallest person at the end of the algorithm. Any program statements used must be fully explained.
You're viewing 8 of 66 questions
Free members see the first 8. Join Learning DEN Pro to unlock all 66 questions on this chapter — plus AI topical search, downloadable topical PDF packs, and examiner marking on any answer. From $9/month.
Don't just read the solution — get your own answer marked
Write your answer to any Computer Science past-paper question, photograph it, and Learning DEN marks it like a real examiner — marks awarded, where you lost them, and your predicted grade. 3 free gradings to start.