!1: option nolet, line 24
!2: string concatenation, line 30
!3: INPUT, line 35
!4: CASE structure, line 37
!5: PAUSE statement, line 34
!6: IF, ELSE, line 50
!7: Int function, line 47
!8: DO loop, line 61
!9: SET ZONEWIDTH, line 77
!10: MAX function, line 81
!11: FOR, NEXT, line 101
!12: Abs value function, line 120
!13: SET COLOR, line 123
!14: ELSEIF, line 151
!15: SOUND, line 162

 

OPTION NOLET                                             !Here, I'm using option nolet so that I don't have to use LET statements
     PRINT "To begin, please tell me your first name..."
     INPUT firstname$
     PRINT
     PRINT "Now please enter your last name..."
     INPUT lastname$
     NAME$ = firstname$ & " "& lastname$                             !Here, I'm joining the two user unputed string variables using concatination
     PRINT
     PRINT "Alright "; name$;" lets begin."
     PRINT
PAUSE 1.5                                             !Here, I'm having the program pause momentarily before moving onto the next part of the program.
INPUT prompt "Are you ready to take a math test?...": reply$               !Here, I'm having the user input a string variable, which...     
PRINT
SELECT CASE reply$                                                !...the select case will read and decide which case it belongs in to know which result to print.
     CASE "Yes", "YES", "yes","Y","y"
          PRINT "Good...here we go!"
          PRINT
     CASE else
          PRINT "Whatever...you're taking one anyway!  Here it goes..."
          PRINT
END SELECT
PAUSE 1.5
INPUT prompt "Please enter a number that includes a number after the decimal point?...":reply
     LET answer1 = Int(reply)
     PRINT
     INPUT prompt "Please round that number to the next whole number on the left of it on a number line..." : reply2
          IF reply2=answer1 then                           !Here, I'm allowing the program to decide which answer to give by telling                                                          
               PRINT                                   ! The "correct" response and then telling it to give an incorrect response
               PRINT "Correct!"                         ! for any other input.
              
          ELSE
               PRINT
               PRINT "Sorry, the correct answer is ";answer1; ".  We'll skip to the next question now."

          END IF
PAUSE 1
PRINT
DO                                                    !Here, I'm having the program loop this question until the user enters a value that is larger than 100                                                           
     INPUT prompt "Please enter a number that has a value in the hundreds place...":value
          IF value >=100 then
               PRINT
               PRINT "Awesome!  Next question..."
          ELSE
               PRINT
               PRINT "I don't think so.  Let's try again!"
               PRINT
               PAUSE .5
          END IF
LOOP while value <100
PAUSE 1
PRINT
PRINT "I think it's time to let you make some of the decisions.  Please enter three numbers seperated by commas..."
     INPUT num1, num2, num3
SET ZONEWIDTH 5                                             !Here, I'm setting how many spaces will be between each number when displayed
     PAUSE 1.5
     PRINT
     PRINT "You entered";num1,num2,num3
          LET largest= -maxnum                              !Here, the program is finding the largest number of the three entered by
          LET largest= max(largest, num1)                         !comparing them to each other.
          LET largest= max(largest, num2)
          LET largest= max(largest, num3)
     PRINT
     PAUSE 1.5
INPUT prompt "Which of these numbers is the largest?":reply
     IF reply=largest then
          PAUSE 1.5
          PRINT
          PRINT "Correct!"
     ELSE
          PAUSE 1.5
          PRINT
          PRINT "Sorry, the correct answer is ";largest;"."
     END IF
PRINT
PAUSE 1.5
INPUT prompt "What is the sum of 1+2+3+4+5...": reply
     LET sum = 0
     FOR count = 1 to 5                                   !Here, I'm having the program loop a certian amount of loops.  In each loop
     LET sum=sum + count                                   !the program is adding the number from the first loop to the number in the
     NEXT count                                        !next loop, and so on for the specified number of loops.
          IF reply = sum then
               PRINT
               PRINT "Correct!"
          ELSE
               PRINT
               PRINT "I'm sorry, the correct answer is ";sum
          END IF
PRINT
PAUSE 1.5
PRINT "Now, if you get this one right, you might get to see something slightly more interesting"
PAUSE 1.5
PRINT
INPUT prompt "Please enter a positive or negative number...":x
PRINT
PRINT "What is the absolute value of ";x;"?"
PRINT
INPUT reply
LET correctreply=abs(x)                                        !Here, the program is deciding what the absolute value of the entered     
IF reply = correctreply then                                   !is.  If the user is also able to correctly identify the absolute value,
     PRINT
     SET COLOR "green"                                   !they get to see the rest of the program in green!  woohoo.
     PRINT "Correct!"
     PRINT
     PAUSE 1.5
     PRINT "See, now, we are in color!"
ELSE
     PRINT
     PRINT "I'm sorry, the correct answer is ";correctreply
END IF
PAUSE 1.5
PRINT
PRINT "This one's a little different..."
PAUSE 1.5
PRINT
     PRINT "If you enter a 1, you'll see a line of $"
     PRINT
     PAUSE 1.5
     PRINT "If you enter a 2, you'll see a line of #"
     PRINT
     PAUSE 1.5
     PRINT "If you enter a 3, you'll see a line of *"
     PRINT
     INPUT prompt "Your choice...":choice

          IF choice = 1 then
               FOR I= 1 to 25
                    PRINT "$";
               NEXT I
          ELSEIF choice = 2 then                              !This is similar to the IF, ELSE case, but here, I can enter more than
               FOR I= 1 to 25                              ! 2 choices for the program.  In this case, there are 4 choices.
                    PRINT "#";
               NEXT I
          ELSEIF choice = 3 then
               FOR I= 1 to 25
                    PRINT "*";
               NEXT I
          ELSE
               PRINT "Not a valid choice.  Too bad, because..."
          END IF    
SOUND 100,1                                             !Here, the program is making a sound at 100 frequency for 1 second
PAUSE 1
PRINT
PRINT "You're done!"
END