# Code Snippets

Sentence/Word Type Test:

This test retrieves words from a database of words, and according to the number of words an user wants, outputs them in either a list, or a line format them for a set amount of time.

<figure><img src="https://2996619558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjzLWpCKFPDKAQqz0tmk%2Fuploads%2F6gzpO1ThcADMcJoO5qLY%2Fimage.png?alt=media&#x26;token=a4776f30-c12d-4681-a226-069ed39a0e03" alt=""><figcaption><p>Word Test Function <strong>met_string (string_count,type)</strong></p></figcaption></figure>

The user then inputs the words to his/her memory’s capability, and the accuracy is handled by accuracy function \[**acc\_time\_test\_str()**] of code. It converts the word into a list format, and checks the words to the original word list.

<figure><img src="https://2996619558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjzLWpCKFPDKAQqz0tmk%2Fuploads%2FNUV8YYVamRhrHXAaWUq0%2Fimage.png?alt=media&#x26;token=2356ab82-c697-44da-bafa-6f64bed78ffa" alt=""><figcaption><p>Input Word Accuracy Test Function - <strong>acc_time_test_str()</strong></p></figcaption></figure>

### Character Test:

This test retrieves various characters from a database of alphanumeric characters, and according to the number of characters an user wants, concatenates them into a single string and outputs them for a set amount of time.

<figure><img src="https://2996619558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjzLWpCKFPDKAQqz0tmk%2Fuploads%2FNPgCVANjMiAqnud9Ftx5%2Fimage.png?alt=media&#x26;token=a6c46565-1c8e-42c6-96be-91cee050ae18" alt=""><figcaption><p>Character/Alphanumeric Test Function - <strong>met_character(character_count)</strong></p></figcaption></figure>

The user then inputs the words to his/her memory’s capability, and the accuracy/timing is handled by character accuracy \[ **acc\_time\_test\_chr()**] function of code. It takes the user input, and checks the words to the original word list.

<figure><img src="https://2996619558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjzLWpCKFPDKAQqz0tmk%2Fuploads%2FoI2ie0KH7s34wdEgWfx5%2Fimage.png?alt=media&#x26;token=a653a022-2948-4f93-98bc-ecc3121b7cde" alt=""><figcaption><p>Alphanumeric Code Accuracy Test Function <strong>acc_time_test_chr()</strong></p></figcaption></figure>

### Pi Test

In this test, the user is given a set digit of Pi, and once those digits are shown for a set amount of time, the user must input them. If they are correct, more digits of Pi are shown and the process repeats.

<figure><img src="https://2996619558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjzLWpCKFPDKAQqz0tmk%2Fuploads%2F0zuWdjyMtyTbL2Ls7KFv%2Fimage.png?alt=media&#x26;token=2fa2d2b5-91b3-4f4c-b94a-c544c2302873" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2996619558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjzLWpCKFPDKAQqz0tmk%2Fuploads%2F9WPVQyGYG2cIW32Xc2K7%2Fimage.png?alt=media&#x26;token=2e8ed826-e722-409a-8664-4b11a38b7404" alt=""><figcaption></figcaption></figure>

It Takes Account For Certain Parameters Such As Digit Increment ( Number Of Digits To Be Increased Per Round ), Remembrance Time : Amount Of Time Given To The User To Remember The Digits. Once The User Loses It Calculates The User's Accuracy -It also Displays A Graph Based On The Data.

<figure><img src="https://2996619558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjzLWpCKFPDKAQqz0tmk%2Fuploads%2FceVEqwkSFA5CVzM8JJJl%2Fimage.png?alt=media&#x26;token=d2e7ead5-6842-4cc7-9d30-3f4adf5fafab" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2996619558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWjzLWpCKFPDKAQqz0tmk%2Fuploads%2F8te0is42cYtsUVptKjH8%2Fimage.png?alt=media&#x26;token=cde406b9-0a24-4599-870e-777dd9ccfdfb" alt=""><figcaption><p><strong>accuracy_pi() function</strong>, containing accuracy calculations and graphical representation</p></figcaption></figure>
