The program that we’re going to create in this chapter will ask the user his first name, his name and his age. At the end, the program will make a synthesis!
| Your first name is: ....... Your name is: ....... Your age is: ....... You’re over 20/less than 20 | 
HERE ARE THE PRIMITIVES WE’RE GOING TO USE: 
| 
      sentence [30 k] "a ---> [30 k a]
      sentence [1 2 3] 4 ---> [1 2 3 4]
      sentence [1 2 3] [4 5 6] ---> [1 2 3 4 5 6]
 | 
This is the code program:
| 
                                                                                                  
                                                                                                  
 to question
 read [How old are you?] "age
 read [What’s your first name?] "fname
 read [What’s your name?] "name
 print sentence [Your name is: ] :name
 print sentence [Your first name is: ] :fname
 print sentence [Your age is: ] :age
 if or :age>20 :age=20 [print [You’re over 20]] [print [You’re less than 20]]
 end
 |