Question: PLEASE CAN I HAVE THE ANSWER USING OUBUILD NOT CODE!!!! Question 3 ( 2 5 marks ) This question focuses on Part 3 ( selection
PLEASE CAN I HAVE THE ANSWER USING OUBUILD NOT CODE!!!! Question marks This question focuses on Part selection and Part repetition As inspiration for this question, you might like to revisit Activity of Part 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 question marks. She requires a when spacekeypressed script that will take a word from the user and display a new word that is the same as the original except that each letter in the middle of the alphabet j to q inclusive has been replaced by a question mark 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 "elephant' then eehat is displayed. One way to think about creating the new word for display is to start with the new word as an empty string and then work through the letters in the original word from first to last, creating the new word incrementally by adding either the letter concerned or a question mark as appropriate. This might be visualised as in Figure Original word New word so far: Figure e Test number New word so far: I New word so far: e Recall that, as in Part Activity 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 ideas above, or alternatives of your own. marks b Create a when spacekeypressed 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 whengreenflagclicked script. e p New word so far ee 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. New word so far: ee Take a screenshot of your scripts and paste it into your TMA document marks Test purpose All letters in middle of alphabet Inputs Word knoll Expected results New word displayed
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
