# Tests/Calculate

### From OLPC

< Tests

## Contents |

## Start the calculate activity

*Actions*

- Start the calculate activity by clicking the icon for it in the home view.

Verify:

- A calculate icon is added to the activity ring on the home screen.
- The calculate icon throbs to indicate the activity starting up.
- That the calculate activity starts properly.

## Use Copy/Paste/Cut

*Actions*

- Type something into the main window of the calculator.
- Click the Edit tab.
- Select what you just typed, and press the copy button.
- Click somewhere in the main window, and press the paste button.
- Select some other section of text, and press the cut button.
- Click somewhere in the main window, and press the paste button.

*Verify*

- When you click the Edit tab, the Copy, Paste, and Cut buttons come up at the top of the screen.
- When you press paste the first time, whatever text you copied is pasted in that place.
- When you press cut, the text you selected disappears from the window.
- When you press paste the second time, the text that was cut appears where your cursor is.

## Use Algebra Features

*Actions*

- Click the Algebra tab.
- Click in order: a number, the square button, the enter button.
- Click in order: the sqrt button, a number, the enter button.
- Click in order: the exp button, the ln button, a number, the enter button.
- Click in order: a number (preferably low), the fac button, the enter button.

*Verify*

- The square of the first number is returned.
- The square root of the second number is returned.
- The the third number is returned.
- The factorial of the fourth number is returned.

NOTE: Either do tests with small enough numbers that you can do the math in your head, or use another calculator to check the answers.

## Use Trig Features

*Actions*

- Click on the format tab, and click the deg/rad button until it shows rad.
- Click on the Trigonometr tab.
- Click in order: the sin button, a number (preferable to use something like pi/2), the enter button.
- Click in order: the acos button, zero, the enter button. Then, divide the answer by pi. (click divide to get the previous result with a divide symbol)
- Click in order: the sinh button, a number, the enter button.
- Click on the Format tab, and click the deg/rad button once. (should show deg)
- Click on the Trigonometr tab.
- Click in order: the cos button, a number (e.g. 45), the enter button.

*Verify*

- The deg/rad button appears when the Format tab is clicked.
- The trigonometric functions buttons appear when the Trigonometr tab is clicked.
- The sin, acos, sinh, and cos functions all yield the correct relults.
- The deg/rad button changes the trig functions from working in radians to degrees and back.

NOTE: Either do tests with numbers with which you can do the math in your head, or use another calculator to check the answers.

## Use Boolean Features

*Actions*

- Click on the Boolean tab.
- Click in order: either 1 or 0, the and button, either 1 or 0, the enter button.
- Click in order: either 1 or 0, the or button, either 1 or 0, the enter button.
- Click in order: either 1 or 0, the xor button, either 1 or 0, the enter button.
- Click in order: a number, the eq button, a number (can be same as first), the enter button.
- Click in order: a number, the neq button, a number (can be same as first), the enter button.

*Verify*

- The boolean function buttons appear when the Boolean tab is clicked.
- The outcomes of the boolean functions is correct.

## Check Constants

*Actions*

- Click the Constants tab.
- Click the pi button and then enter.
- Click the e button and then enter.

*Verify*

- Clicking the Constants tab brings up the constants buttons.
- The values for pi and e are correct.

## Use help Feature

*Actions*

- Type help(index) in the main window, and hit enter.
- Type help(plot) in the main window, and hit enter.
- Press the up button twice, so that help(index) is in the window again, and hit enter.
- Type help(exp) in the main window, and hit enter.

*Verify*

- Entering help(index) brings up the index of all the help topics.
- Entering help(plot) brings up the help article on plotting.
- Pressing the up arrow allows you to re-enter past commands.
- Entering help(exp) brings up the help article for exponentiating.

## Create and Use Variables

*Actions*

- Type apples in the Label: window.
- Type 5 in the main window, and hit enter.
- Type oranges in the Label: window.
- Type 5 in the main window, and hit enter.
- Type apples=oranges in the main window, and hit enter.

*Verify*

- After entering apples and 5, the screen to the right shows apples equaling 5.
- After entering oranges and 5, the screen to the right shows oranges equaling 5.
- After entering apples=oranges, the screen should say that it's true.

## Plot a Function

*Actions*

- Type plot(x^2,x=-4..5) in the main window, and hit enter.

*Verify*

- A graph of the function f(x)=x^2 is generated.
- The graph's range (values of x) is from -4 to 5.

## Quit the activity

*Actions*

- Click the Activity tab.
- Click the X in the top right corner.

*Verify*

- Clicking the Activity tab brings up the activity options, including the close button.
- That the activity closes properly.