Sefp - computing programming assignment - write a program


Word Play

In this assignment you will write a program which will give the user the following menu of options
1. Enter a word
2. Check letter or vowel times
3. Palindrome
4. Anagram
5. Exit

Explanation

The menu allows the user to enter a word and then choose from the other options to carry out operations on that word.

The program should not be case sensitive. For example, if RadAr is entered, ‘R' will be recognised as being the same as ‘r'.
You should use while loops to iterate through your list rather than use built in functions to carry out the main operations in menu options 2, 3 and 4.
Write functions (defined by def) where you can.

Guidance on options

1. Enter a word Invite the user to enter a word and then turn the word into a list.

2. Check letter or vowel times
Invite the user to enter a letter or check for vowels and then carry out a linear search which will count how many times that letter occurs in the word entered in 1.

3. Palindrome
A palindrome is a word which has the same spelling from right to left as it has left to right e.g.CIVIC.
Your code will check if the word entered in option 1 is a palindrome and output a suitable message.

4. Anagram
An anagram is a word which contains the same letters as the original word. e.g. SILENT is an anagram of LISTEN.
Your code will invite the user to enter another word and check if it is an anagram of the word entered in option 1.

Some methods will just check if both words contain the same letters but do not deal with the number of times the letters occur. Other methods will take this into account and therefore be true anagram checkers. Either of these alternatives are acceptable for this assignment.

5. Exit
Leave the program. The menu of options will repeat until '5' is entered

Test data

Test your program with the following data, but make sure that it works with other data.
CIVIC
LEVEL I
E
LISTEN
SILENT

Make sure that the work is your own.
This course work contributes 10% of your final mark for the course and must be individual in the same way that an exam answer is your own work. Try and use lists, functions and While loops where necessary. Remember to use while loops to iterate through your list rather than use built in functions to carry out the main operations in menu options 2, 3 and 4. For example built in functions like [::-1] or str.reverse() - reversing the string will not be accepted as a valid method for checking Palindrome or Anagram.

Solution Preview :

Prepared by a verified Expert
Computer Engineering: Sefp - computing programming assignment - write a program
Reference No:- TGS02583197

Now Priced at $25 (50% Discount)

Recommended (95%)

Rated (4.7/5)