Review

As a way to test your comprehension of the information, and to ensure that you actually read through the information instead of merely skimming over it, we have provided review exercises. These exercises provide a way of helping you apply the information, so that you get a fuller understanding of the concepts. Highlight the area next to the word answer for the answer.

1. True or False: The ClrHome command should be used at the end of a program, to ensure that the program does not leave any leftover text on the home screen.

Answer:

2. What type of variable cannot hold a complex number?

Answer:

3. Which of the following uses of the Disp command returns an error?

  1. Disp
  2. Disp ""
  3. Disp "Hello World
  4. Disp "Hello","World
  5. None of the above
Answer:

4. Which draw command cannot be called from a program?

Answer:

5. What is the difference between the iPart( and int( commands?

Answer:

6. True or False: Programs can use the home screen for everything they can do on the graph screen.

Answer:

7. What is the minimal modification that will allow this code to start-up?

:Menu("Choose One,"Menu Item",1,"Menu Item",2
:Lbl A
:Pause "Item 1
:Stop
:Lbl 2
:Pause "Item 2
  1. Add a closing quote on the menu title.
  2. Remove the Stop command.
  3. Change Lbl A to Lbl 1.
  4. Add a closing quote on the menu title and change Lbl A to Lbl 1.
Answer:

8. In a statistics class, the teacher asks the students to generate a list of 100 random numbers. Unfortunately, the exercise doesn't work as intended because 22 students, in a class of 30, get the exact same numbers (using different calculators). What's a likely explanation for this surprising coincidence?

Answer:

9. How many digits of accuracy does the TI-OS have? How many can it display on the screen?

Answer:

10. The Output( command can display text at any place on the screen, but what happens when the text goes past the end of the line?

  1. Nothing. The text simply does not show up.
  2. An error is returned.
  3. The text will wrap around to the next line.
  4. An ellipsis will be displayed at the end of the line, with the rest of the text not being displayed.
Answer:

11. True or False: You need to use a Pause command before clearing the screen, otherwise the user will only see the text on the screen for a couple seconds; it will be a blur.

Answer:

12. When is using the Menu( command appropriate, and even desired? (Choose the best answer.)

  1. If you want a generic menu.
  2. Your program is going to be text-based.
  3. It is the most practical menu available in your situation.
  4. You want your program to stand out, so you need a fancy menu.
Answer:

13. What would be the effect of replacing a Disp command with an Output( command and vice verse? Give any instances where this switch might be useful. Also, when would you use Disp in conjunction with Output?

Answer:

14. What is the maximum dimension of a list?

Answer:

15. Which one statement is true about this code?

:Menu("","",B,"",B
:Disp "Test
:Lbl B
:Disp "Pizza
:Output(1,1,"Spaghetti
  1. An error will be returned when the Menu command is executed.
  2. The program will execute, but there will not be any text displayed.
  3. The "Test" text will be displayed along with the "Pizza" and "Spaghetti" text.
  4. The "Pizza" and "Spaghetti" text will be displayed, but not the "Test".
Answer:

16. True or False: Before using the Menu( command, you need to clear the home screen, otherwise you will have text interrupting the menu.

Answer:

17. Consider the following code:

:0:Menu("Difficulty","Easy",3,"Medium",2,"Hard",1
:Lbl 1:Ans+1
:Lbl 2:Ans+1
:Lbl 3:Ans+1

The Ans variable keeps track of the last answer, often being used in place of more permanent variables. If the user selects the "Hard" menu item, what will Ans's value be? What effect does the label ordering have on the value, if any? Why?Answer:

18. True or False: Using the home screen is faster than using the graph screen?

Answer:

19. Which of the following cannot be used to test if a variable is any of 1, 2, 3, or 4?

  1. If sum(A={1,2,3,4
  2. If (A=int(A))(A>=1)(A<=4)
  3. If A={1,2,3,4}
  4. If A(int(A)=A)(A<5)
Answer:

20. True or False: The following is an alternate to using the or operator.

:If (X=1)+(X=2
Answer:

21. Name a command or function that cannot be interrupted by pressing the [ON] key.

Answer:

22. For which of the following would not(B) not equal 0?

  1. .01→B
  2. 0→B
  3. π→B
  4. -4→B
Answer:

23. True or False: The following is an alternative to using the and operator.

:If Anot(B
Answer:

24. How many bytes is an uppercase character? A lowercase character?

Answer:

25. Which of these user-created list names are actually possible on the calculator?

  1. L1234
  2. LBaDd
  3. Lθθθθ
  4. LABCD
Answer:

26. What type of variable needs a special command to store to it?

Answer:

27. Change this short program so it doesn't flicker and then optimize it as much as possible.

:0→X:0→Y:Repeat 0
:ClrHome
:Output(Y,X,"X")
:getKey→K
:If K=24:X-1→X
:If K=25:Y+1→Y
:If K=26:X+1→X
:If K=34:Y-1→Y
:End
Answer:

28. True or False: You can archive another program from within a program.

Answer:

29. What is the maximum length of a string?

Answer:

30. Which of the following variables is it possible to archive?

  1. Y1
  2. prgmKEWLGAME
  3. the real variable T
  4. the real variable A
  5. L_RESID
  6. L1
Answer:

31. Without trying it first, is this legal?

:[A]L4([A]([A](L1(1),L2(1)),L1(1(L2(2L3
Answer:

32. How would you find the fifth element from the last in a sequence of 20 elements?

Answer:

33. What will this code do?

:DelVar B1→A
:If A:If B
:Disp "Hello World
Answer:

34. How do you get rid of the Done message at the end of a program?

Answer:

35. Write a program that inputs a string and outputs the letters backward, one per line.

Answer:

36. Will this code execute?

:If 0:Disp "Your turn
:Else:Disp "Guess not
Answer:

37. What is the simplest program you can have that has recursion?

Answer:

38. Which of these are logically equivalent?

  1. not(P or Q)
  2. P and Q
  3. not(P and Q)
  4. not(P) or not(Q)
  5. not(P) and not(Q)
Answer:

39. True or False: There are actually 256 picture variables on the calculator, even though only 10 picture variables show up.

Answer:

40. What are the differences between Assembly and TI-Basic? When would you use Assembly and when would you use TI-Basic?

Answer:

41. How long will the program go through the loop until it stops execution?

:0→X
:While X
:Disp "Another Loop
:X+1→X
:If X=25
:Stop
:End
Answer:

42. What is wrong with this code?

:If X=25 Then
:Disp "X is 25
:X+1→X
:Disp "X is now", X
:End
Answer:

43. What are the only keys that can actually be held down, causing them to be repeated?

Answer:

44. How would you go about converting a list to a matrix? What would the code look like?

Answer:

45. True or False: There is no built-in way to convert a string to a number.

Answer:

<< Exercises Table of Contents What Next? >>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License