Using the names of numbers is a useful at an early stage in learning another language.
requirement
Store the spelling of the numbers 0 to 5 in French. An array will be needed to store the list of six French words. Display each number digit along with the French spelling. The user can then read and try to memorise each number spelling. Allow the user to choose any number by typing in the digit and the program should display the spelling for that word. The user can try to predict the spelling and then ask the program to show the correct spelling.
numberNames[spellDigit] identifies the array and the position of the element to be used, spellDigit is a variable that should have been set to any value 0-5
program code
Loading…
PRIMM
predict
* what word will be displayed when the digit 1 is entered
* what value should be entered to display "cinq"
investigate
what happens if you enter the value 6
what happens when you enter the value -1
what happens when you enter the value 3.5 or 1.0
modify
The next set of French words for the numbers 6-10 are:
six, sept, huit, neuf, dix
Can you edit your code to include the new words at the end of the existing list. Then get the program to display all the numbers up to 10. Can you anticipate what position the word "dix" will be in?
make
What is the most recent list you have had to memorise?
Add some code to this program to store your list and display all the values in your list?