PROGRAM SET 6
1. Exercise 4.1.1
(HW) Do Exercise 4.1.1 in your reading. Write the answers in your journal! Add notes and terms from Chapter 4.
Type in the sample program reply from the book following these directions:
2. Exercise 4.1.1 – Addition
Write a translator program for another language. The program consumes the English word and returns the foreign word. You must have at least ten (10) words in your list.
Hint: Remember, all characters are case sensitive. It is best to use all lower case characters. Do NOT use proper nouns in this translator program.Sample:
;;Spanish: symbol -> symbol ;;to determine the Spanish word for an English word. (define (Spanish word) (cond [(eq? word 'dog) 'perro] [(eq? word 'black) 'negro] [(eq? word 'boat) 'barco] [else "The word is not in this translator."])) (Spanish 'dog) = 'perro (Spanish 'cat) = "not there"3. Exercise 4.1.4 - Quadratic Equation. Do the plans again on the template form. Turn in these plans with the program.
4. Exercise 4.1.2 and Exercise 4.1.3 – Guessing games
5. Exercise 4.1.5 - Mastermind