Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an ALGORITHM for this code, just a step-by-step guide to complete the task. The program does the following: The teacher wishes to see if

Write an ALGORITHM for this code, just a step-by-step guide to complete the task.image text in transcribed

The program does the following:

The teacher wishes to see if her pupils can make sense of words from 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 all letters in the second half of the alphabet (n to z inclusive) have been removed.

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

'rhinocerous'

then

'hice'

is displayed.

when space key pressed ask Enter your word and wait say join answer is the word set input Word to answer set letters ToRemove to nopqrstuvwxyz set result to set to 1 repeat length of inputWord set to 1 set keepLetters to true repeat length of lettersToRemove letter of inputWord = letter of lettersToRemove set keepLetters if then to false change true then keepLetters set result to join result letter i of inputWord change by say join Your word with letters removed is result

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Database Security Applications And Trends

Authors: Michael Gertz, Sushil Jajodia

1st Edition

1441943056, 978-1441943057

More Books

Students also viewed these Databases questions

Question

5. Our efficiency focus eliminates free time for fresh thinking.

Answered: 1 week ago