In this challenge, we will create a Word Unscramble quiz where the computer will randomly pick up words from a given list, scramble the letters of the word, output the scrambled word (anagram) and ask the user to guess the original word. For each correct answer, the user will be given 1 point.
Here is the flowchart of our game:
Looking at the above flowchart, answer the following questions:
- Where are the variables score and total initialised?
- Where is the variable score incremented by 1?
- Where is a list declared/initialised?
- Where is iteration used and what for?
- Where is selection used and what for?
- Where is the subroutine/function scramble() called?
- Where is an input statement used?
- Where is string concatenation used?
We have started the code for you and implemented the scramble() function.
Your task is to complete this code from line 29, following the steps identified in the above flowchart.