Anagrams

Anagrams are a common feature of crosswords and quiz programs such as Countdown and Only Connect. In this assignment you'll use the BASIC string manipulation functions to create anagrams. Anagrams are words that have the same letters as the original word, but in a different order.

Commands

Here is a reminder of the commands you might need for this task.

Your Task

Your task is to produce a program to jumble words entered by the user and turn them into anagrams. Your program should:

  1. ask the user for a word
  2. jumble the word to form the anagram and print the result
  3. be clear and easy to use

The minimum output is the anagram, but you can add extra text to make your program easier to understand.

Extension

There are many ways in which you could extend this program. You could try taking a whole sentence as input and jumbling only the words, keeping the spaces in the same place to separate the words. Better still, you might have seen sentences where the letters of each word are jumbled, apart from the first and last letter, and the sentences are still readable - you could try to create a program to do that, e.g. to turn the input the quick brown fox jumped over the lazy dog into something like the qciuk borwn fox jepmud oevr the lzay dog.