Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The question needs to be implemented in OUBuild , so please, if you have the program, kindly help me answer the question with a screenshot.
The question needs to be implemented in OUBuild, so please, if you have the program, kindly help me answer the question with a screenshot.
Thank you
Please only OUBuild answers
This question focuses on Part 3 (selection) and Part 4 (repetition). As inspiration for this question, you might like to revisit Activity 4.8 of Part 4, which uses a list of specific characters. The teacher wishes to see if her pupils can make sense of words in which certain letters have been replaced by stars (asterisks). She requires a when[space]key_pressed script that will take a word from the user and display a new word that is the same as the original except that each of the last nine letters of the alphabet ( r to z The user should input the word as a single string and the new word that is displayed should be a single string. For example, if the user enters 'rattle' then '** a le is displayed. Initially, you might think of working through the original word letter by letter, modifying it as you go. However, this is not the simplest way to achieve what is wanted. A better approach is to start a new word, which is empty at first, then work through the original word examining its letters one by one and adding either the same letter or **, as appropriate, to the new word. This is illustrated in Figure 2. Original word Figure 2 Show description V Recall that, as in Part 4 Activity 4.8, a simple way to check whether a given character is one of a set of specific characters is to check whether it is in a list that has been populated with those specific characters. a. Create and write down an algorithm to solve this problem. You might like to use the idea above, or an alternative of your own. (10 marks) b. Create a when [space]key_pressed script to implement your algorithm. Depending on your algorithm and the way in which you choose to implement it, you may also decide to have a when_green_flag_clicked script. Take a screenshot of your script(s) and paste it into your TMA document. (11 marks) c. Copy the following table into your TMA document and add to it two tests you would perform to check whether the completed program fulfils the specification. (Several tests might be appropriate; however, you are only required to add two.) (4 marks) Save your OUBuild project for Question 3 and submit it as TM111_O2_Q3_PI. sb2 (where PI is your OU personal identifier, e.g. A1234567) in your TMA zip file. Alternatively, you may use yourStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started