Memory Trainer in Python

by Robotix_au in Circuits > Computers

1349 Views, 14 Favorites, 0 Comments

Memory Trainer in Python

Python Memory Training Program
InstThumb.PNG

This program starts of by creating a list of words. It then shuffles the list and asks you how many words you would like to get tested on and how many seconds you would like per word

Then it checks your results and you get a score :)

If anyone out there wants to collaborate I will let you edit and upload new code!

Program starts here:

import random, time, sys, os

wordList = ['book','cook','table','car','pen','stand', 'carpet','computer','soap', 'ball','van','tub', 'bat','bed','book','boy','bun','can','cake','cap','cat', 'cow','cub','cup','dad','day','dog','doll','dust','fan','feet', 'girl','gun','hall','hat','hen','jar','kite','man','map','men', 'mom','pan','pet','pie','pig','pot','rat','son','sun','toe', 'marshmallow','steak','butterfly', 'fire','chocolate','banana', 'bunny','bubbles','rock','panda','kitten','meerkat', 'crazy', 'dinosaur', 'coffee']

random.shuffle(wordList)

points = 0

print("how many words do you want to test yourself on")

testLength = int(input()) # how many words do tou want to test?

print("how many seconds per word")

timePerWord = int(input()) # how much time do you want per word

print("These are the words that you have to memorise:")

def spaceOut():

for i in range(0,14):

print('*')

for i in range(0,testLength):

spaceOut()

print(wordList[i])

spaceOut()

time.sleep(timePerWord)

print("now its your turn to guess all the words in the correct sequence")

for i in range(0,testLength):

yourGuess = input()

if yourGuess ==wordList[i]:

points = points + 1

print("Correct!!")

else:

print("Nope, the answer is " + wordList[i])

print("your scored " + str(points) + " out of " + str(testLength))

time.sleep(6)

Downloads