update meta data
This commit is contained in:
parent
f3a896c724
commit
90e15ed6ce
3307 changed files with 1674 additions and 7 deletions
11
Task/Menu/00DESCRIPTION
Normal file
11
Task/Menu/00DESCRIPTION
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Given a list containing a number of strings of which one is to be selected and a prompt string, create a function that:
|
||||
|
||||
* Print a textual menu formatted as an index value followed by its corresponding string for each item in the list.
|
||||
* Prompt the user to enter a number.
|
||||
* Return the string corresponding to the index number.
|
||||
|
||||
The function should reject input that is not an integer or is an out of range integer index by recreating the whole menu before asking again for a number. The function should return an empty string if called with an empty list.
|
||||
|
||||
For test purposes use the four phrases: “<tt>fee fie</tt>”, “<tt>huff and puff</tt>”, “<tt>mirror mirror</tt>” and “<tt>tick tock</tt>” in a list.
|
||||
|
||||
Note: This task is fashioned after the action of the [http://www.softpanorama.org/Scripting/Shellorama/Control_structures/select_statements.shtml Bash select statement].
|
||||
Loading…
Add table
Add a link
Reference in a new issue