The teacher wishes to see if her pupils can make sense of words in which certain...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The teacher wishes to see if her pupils can make sense of words in which certain letters have been removed. 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 vowel has been removed. For clarification, the vowels should be considered as: a, e, i, o and u. 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 'raise' then 'rs' is displayed. One way to create the new word to be displayed 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. If the current letter is not a vowel then we add it to the new word, otherwise we ignore it. This might be visualised as in Figure 2. Terwise we ign New word so far: " Figure 2 might be visualised as in Figure 2. Original word r New word so far: 'r' a 3 New word so far: 'r' i New word so far: 'r' S New word so far: 'rs' Show description 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) e New word so far: 'rs' 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.) Test number 1 2 3 (4 marks) Test purpose First and last letters are vowels Inputs Word apple Expected results New word displayed ppl The teacher wishes to see if her pupils can make sense of words in which certain letters have been removed. 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 vowel has been removed. For clarification, the vowels should be considered as: a, e, i, o and u. 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 'raise' then 'rs' is displayed. One way to create the new word to be displayed 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. If the current letter is not a vowel then we add it to the new word, otherwise we ignore it. This might be visualised as in Figure 2. Terwise we ign New word so far: " Figure 2 might be visualised as in Figure 2. Original word r New word so far: 'r' a 3 New word so far: 'r' i New word so far: 'r' S New word so far: 'rs' Show description 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) e New word so far: 'rs' 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.) Test number 1 2 3 (4 marks) Test purpose First and last letters are vowels Inputs Word apple Expected results New word displayed ppl
Expert Answer:
Related Book For
Posted Date:
Students also viewed these algorithms questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
1. If France can make 25 pounds of butter or 5 lamps while Spain can make 6 pounds of butter or 1 lamp, who has the comparative advantage in which good? A. France has the comparative advantage in...
-
During 2017, the following transactions were recorded by the Port Hudson Community Hospital, a private sector not-for-profit institution. 1. Gross charges for patient services, all charged to Patient...
-
Assume that Ritchey Industries is expected by investors to have a dividend growth rate over the foreseeable future of 8 percent a year, and that the required rate of return for this stock is 13...
-
How do fungi obtain food?
-
Use the horizontal model, or write the journal entry, for each of the following transactions that occurred during the first year of operations at Kissick Co. a. Issued 200,000 shares of $5-par-value...
-
The figure below shows a manometer system composed of air (grey), water (blue), and mercury (red). The system is open to air with an inclined pipe on its right side. The density of water is p = 1000...
-
Consider the unadjusted trial balance of Burrows Landscaping at December 31, 2023, and the related month-end adjustment data: The following adjustments need to be made on December 31 before the...
-
For the circuit shown in Fig.1 (i), find: (i) the output voltage (ii) the voltage drop across series resistance (iii) the current through zener diode. R=5k I IL Iz LE 120 V 50 V www. 10
-
Explain Business Law is the enforceable rules of conduct that govern the actions of buyers and sellers in market exchanges.? Give me some examples in your everyday life in which you feel that having...
-
Coaching Duty #4 to provide adequate and proper equipment includes Group of answer choices Buying the best equipment Modify equipment and duct tape it when necessary Show athletes how to properly use...
-
When managers make assumptions on the rate of collections for the various items on the statistical budget they develop a: A. Capital budget B. Strategic plan C. Cash budget D. Revenue budget
-
Can you distinguish the uses of electronic surveillance warrants authorized by the wiretap Act and the foriegn intelligence survelliance Act?
-
Coates writes about the precarious position of the Black body in America. What are some specific examples of the dangers that face the Black body?
-
Use the following information pertaining to A/R for the client for Questions 1 through 4: Customer A Balance: $10,000 $20,000 $60,000 $70,000 $120,000 $10,000 $40,000 Customer B Balance: Customer C...
-
On 1 July 2018, Parent Ltd acquired all the shares of Son Ltd, on a cum-div. basis, for $2,057,000. At this date, the equity of Son Ltd consisted of: $ 1,000,000 Share capital 500 000 shares...
-
School district information was examined for a random selection of states. The data below show the number of elementary schools and the number of secondary schools for each particular state. Is there...
-
A sample of 14 commuters in Chicago showed the average of the commuting times was 33.2 minutes. If the standard deviation was 8.3 minutes, find the 95% confidence interval of the true mean.
-
A police investigator read that the reasons why gun sales to applicants were denied were distributed as follows: criminal history of felonies, 75%; domestic violence conviction, 11%; and drug abuse,...
-
The magical elevator. There is a man who lives on the top floor of a very tall building. Every day he gets the elevator down to the ground floor to leave the building to go to work. Upon returning...
-
There are 5 different color houses, occupied by people of 5 different nationalities, who smoke 5 different cigar brands, drink 5 different types of alcohol, and have 5 different pets. The houses are...
-
A man went outside without an umbrella or a raincoat, yet did not get wet.
Study smarter with the SolutionInn App