Write a program which will give the user the menu of options

Assignment Help Computer Engineering
Reference no: EM131787686

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.

Reference no: EM131787686

Questions Cloud

Effective rate of interest for the given types of loans : Your company plans to borrow $5 million for 12 months, and your banker gives you a stated rate of 14 percent interest.
Write a program to determine whether integer overflow : Write a program to determine whether integer overflow in your version of C++ results in the "wrap-around" behavior described in the text.
Prepare journal entries to record merchandising transactions : Prepare journal entries to record the following merchandising transactions of Bask Company, which applies the perpetual inventory system
Dysfunctional conflict and functional conflict : Define conflict and distinguish between dysfunctional conflict (bad) and functional conflict (good).
Write a program which will give the user the menu of options : SEFP - Computing Programming Assignment - write a program which will give the user the menu of options - Enter a word Invite the user to enter a word
What is the effective rate of interest : Zerox Copying Company plans to borrow $150,000. New Jersey National Bank will lend the money at one-half percentage point over the prime rate at the time.
Contrast management with leadership : Contrast management with leadership and explain their relationship to one another.
Write an enumeration currency : Write an enumeration Currency whose enumerators are the names of D. S. coins with values up to one dollar and in which the integer associated
Write declarations for variables : Write declarations for variables p1 and p2 whose values will be addresses of memory locations in which a double e can be stored.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Prepare an isr and startup code for a system

Prepare an ISR and startup code for a system that lights up LED0 on the PSoC Eval1 board (suppose that a wire is connecting P1[0]) to indicate "Low Voltage" whenever there is a supply voltage monitor interrupt.

  How many bits are needed for the opcode

A digital computer has a memory unit with 16 bits per word. The instruction set consists of 122 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). How many bits are need..

  Determine the new sample size to examine

Sample Size Determination. Jule Phillips is examining the internal control of Cowboy Company and has identified the mathematical verification of sales invoices.

  Translate those virtual memory addresses to physical memory

You need to read a file of ints that represent virtual memory and then translate those virtual memory addresses to physical memory addresses using a page table and translation lookaside buffer.

  Advanced qos configuration

Advanced QoS Configuration, Write a paragraph below that summarizes what was accomplished in this lab and what you learned by performing it

  Write down a short assembly language module

Write down a short assembly language module

  Discuss what type of attack he is carrying out

the password of an admin SAM file he enumerated earlier from the target windows machine. What type of attack he is carrying out

  Home users seem to be a target as they have nobody to

write a 200- to 300-word short-answer response to the followinghome users seem to be a target since they have nobody to

  What can you do to make sure that your organization

question 1 what can you do to ensure that your organization incorporates penetration testing and web application

  Recognize the factors other than price an organization

identify the factors other than price an organization must consider when evaluating whether to build or buy a software

  Questionalgorithm secreta0n - 1input an array a0n - 1 of n

questionalgorithm secreta0..n - 1input an array a0..n - 1 of n real numbersminval larr a0 maxval larr a0for i larr 1 to

  Consider the three normative theories of business ethics

Consider the three normative theories of business ethics. Briefly describe each - and given an example of an ethical decision in business either real

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd