Skip to content

Instantly share code, notes, and snippets.

@sdaves
Last active February 26, 2023 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdaves/f3bdc58fab8b405efc5978208aa00ab2 to your computer and use it in GitHub Desktop.
Save sdaves/f3bdc58fab8b405efc5978208aa00ab2 to your computer and use it in GitHub Desktop.
pytyper_qpython - a simple android qpython script to practice typing
# pytyper_qpython - https://unlicense.org/
#
# a simple android qpython script to practice typing
#
# install qpython apk from below, create this script (use Editor), edit words list below
#
# https://github.com/qpython-android/qpython/releases
from androidhelper import Android
import random
import time
words = "is was are behave had were can said use do will would make like has look write go see could been call am find did get come made may take know live give think say help tell follow came wants how set put does must ask went read need move try change play spell found study learn should add keep start thought saw turn might close seem open begin got run walk began grow took carry hear stop miss eat watch let cut talk being leave"
words = words.lower().replace(',','').replace(' ',' ').replace('“','"').replace('’',"'").split(' ')
droid = Android()
print('''
pytyper_qpython
press CTRL-D to quit
''')
while True:
word = random.choice(words)
if not word or not word.strip():
continue
word = word.split('–')[0].strip()
value = ""
while word != value:
print(word)
droid.ttsSpeak(word)
value = input()
print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment