Source word Anagrams late tale, teal. pate peat, tape. pare pear, reap. parse asper, pares, pears, prase.
Question:
Source word | Anagrams |
late | tale, teal. |
pate | peat, tape. |
pare | pear, reap. |
parse | asper, pares, pears, prase. |
rate | tare, tear. |
tales | stale, slate, tesla, steal, least. |
east | eats, sate, seat, seta, teas. |
alerts | alters, artels, estral, laster, ratels, salter, slater, staler. |
post | pots, spot, stop, tops. |
alerting | altering, integral, relating, triangle. |
steak | skate, stake, takes. |
live | evil, veil, vile. |
meat | mate, team, tame. |
insert | estrin, inerts, inters, niters, nitres, sinter, triens, trines. |
laser | earls, reals, rales, lares. |
lapse | peals, pleas, pales, sepal. |
angle | angel, glean, genal. |
super | purse, sprue. |
scrape | capers, crapes, spacer, pacers. |
retains | stainer, starnie, resiant, nastier, retinas. |
This dictionary can be used in many parts of your program for different purposes, e.g., choosing the desired alphabets for the users and comparing if an anagram inputted by the user is valid.
Program features: Your program will notify users about this level and the task the users need to complete. Following that, your program will display a sequence of five (5) words, with the letters of each word scrambled. Your program must randomly select these words from the anagram dictionary stored in the "Game" class for each play and attempt. Your program then needs to generate scrambled versions of the selected words for the users. The users need to input the original version of each word as a sequence of words. The users complete this task if at least three words entered by the users are valid. Your program will display which of the inputted words are valid and not. Your program will notify the users upon completion of the task.
Users can input a sequence of words separated by spaces.
Generating scrambled words: There are many ways to scramble the letters in a word. One way is to swap the adjacent letters in pairs.
Generate scrambled word (input is the word):
//Step 1. Convert the string into a char array
//Step 2. Initiate an index variable, idx with 1 (not 0)
//Step 3. Loop till the length of array
//Step 4. Exchange the letters in position idx-1 and idx
//Step 5. Increment idx by 2
//Step 6. Convert the modified char array into string
//Step 7. Return the string
End
Note: This is just guide for how to apply for above conditions.
Level 2: Welcome to "The Word And Number Game" Level 2: Scrambled Words At this level, you are given a set of scrambled words. Your task is to input a non-scrambled version of the words that you can come up with, separated by spaces. You win if there are at least three correct words. Your scrambled words: aetl paet aerp aresp selat
Please give your input:
Fail! at least three inputted words must be valid
Your words: tpae paer and laest are invalid
*** Please give your input (second chance):
Congratulations! You completed level 2 successfully