Hidden WordScanner
Private scans · No account required

DuckieDai Math Blitz

A 10-question mental math game with three levels, from adding and subtracting up to powers and fraction sums, with points and a streak bonus for answers in a row.

games · MIT License

Overview

A 10-question mental math game with three levels, from adding and subtracting up to powers and fraction sums, with points and a streak bonus for answers in a row.

  • Owner-tested on a TI calculator
  • Version 1.0.0
  • 2166 bytes
  • Uses random

Before you run it

  • TI-84 Plus CE Python · No calculator OS or Python App version has been verified.
  • TI Connect CE .py transfer to the Python App; the owner's transfer details were not recorded
  • Questions are made up at random by the calculator for every round.
  • An answer counts as correct when it is within 0.000001 of the exact answer.
  • Answers may be typed as whole numbers, decimals, or a fraction such as 5/6; anything else asks again.

Play it here first

Play a full round right here before you download. The screen below runs the same steps as the calculator game: type your answer in the box under it and press Enter, just as you would on the calculator. Each round picks a new secret, and nothing you type is saved.

JavaScript is required for the optional browser simulation. Source viewing and downloading remain available without it.

Simulation boundary: This preview uses a reviewed browser adapter. It does not execute the downloaded Python and does not prove TI-Python or calculator compatibility.

How to play

How to play Math Blitz

About the game

Math Blitz is a 10-question mental math race. Each round shows one question; type the answer and you earn points, with extra points for answers in a row.

Easy asks addition and subtraction with numbers up to 10, times tables up to 5 x 5, and division. Medium uses numbers up to 20 and adds powers such as 3 ^ 2. Hard uses numbers up to 50, times tables up to 12 x 12, and adds fraction sums such as 1/2 + 1/3.

Controls

1, 2, or 3
choose Easy, Medium, or Hard
4
quit from the level menu
number keys
type an answer; use the division key for a fraction such as 5/6
enter
submit an answer, or go on to the next question
Y
play another game; any other answer ends the game

How to play

Tips

Good to know

Exact reviewed bytes

Source code

Download .py

View source below, copy it when JavaScript is available, or download the exact .py bytes.

  1. # DuckieDai(TM) Math Blitz
  2. # TI-84 Plus CE Python
  3. from random import randint
  4. def clr():
  5. print('\n'*7)
  6. def num(p):
  7. while 1:
  8. try:
  9. s=input(p).strip()
  10. if '/' in s:
  11. a,b=s.split('/')
  12. return float(a)/float(b)
  13. return float(s)
  14. except:
  15. print('Use number or a/b')
  16. def question(level):
  17. op=randint(1,(4,5,6)[level-1])
  18. m=(10,20,50)[level-1]
  19. a=randint(1,m)
  20. b=randint(1,m)
  21. if op==1:
  22. return str(a)+' + '+str(b),a+b
  23. if op==2:
  24. if b>a:a,b=b,a
  25. return str(a)+' - '+str(b),a-b
  26. if op==3:
  27. a=randint(2,(5,9,12)[level-1])
  28. b=randint(2,(5,9,12)[level-1])
  29. return str(a)+' x '+str(b),a*b
  30. if op==4:
  31. b=randint(2,(5,10,12)[level-1])
  32. a=randint(1,(10,12,15)[level-1])
  33. return str(a*b)+' / '+str(b),a
  34. if op==5:
  35. a=randint(2,5)
  36. b=randint(2,3 if level==2 else 4)
  37. return str(a)+' ^ '+str(b),a**b
  38. a=randint(1,5)
  39. b=randint(2,8)
  40. c=randint(1,5)
  41. d=randint(2,8)
  42. return str(a)+'/'+str(b)+' + '+str(c)+'/'+str(d),a/b+c/d
  43. def play():
  44. wins=0
  45. played=0
  46. while 1:
  47. clr()
  48. print('MATH BLITZ')
  49. print('1 Easy 2 Medium')
  50. print('3 Hard 4 Quit')
  51. level=input('Level? ')
  52. if level=='4':break
  53. if level not in ('1','2','3'):continue
  54. level=int(level)
  55. score=0
  56. streak=0
  57. best=0
  58. for i in range(1,11):
  59. q,ans=question(level)
  60. clr()
  61. print('ROUND',i,'OF 10')
  62. print('Score:',score)
  63. print('Streak:',streak)
  64. print()
  65. print(q,'= ?')
  66. guess=num('Answer? ')
  67. if abs(guess-ans)<0.000001:
  68. streak+=1
  69. if streak>best:best=streak
  70. gained=10+min(streak-1,5)*2
  71. score+=gained
  72. print('CORRECT! +',gained)
  73. if streak>=3:print('ON FIRE!')
  74. else:
  75. streak=0
  76. print('NOPE! Answer:',ans)
  77. input('Press Enter ')
  78. played+=1
  79. if score>=100:wins+=1
  80. clr()
  81. print('GAME OVER!')
  82. print('Points:',score)
  83. print('Best streak:',best)
  84. print('100+ point games:',wins)
  85. print('Games played:',played)
  86. if input('Again? Y/N ').upper()!='Y':break
  87. clr()
  88. print('QUACK QUACK!')
  89. print('hiddenwordscanner.com')
  90. print('DUCKIEDAI(TM)')
  91. print('MATH BLITZ')
  92. print(' __')
  93. print(' ___(o )> quack!')
  94. print(' \\ <_. )')
  95. print(" `---'")
  96. print('by DuckieDai')
  97. print('hiddenwordscanner.com')
  98. input('Press Enter ')
  99. play()
Filename
MATHBLZ.py
Size
2166 bytes
SHA-256
c6502a7fb0b29356546f6358204162df0d11393afeb4b364f64a9f9806ef1587

Usage

Inputs

  • A level: 1 Easy, 2 Medium, 3 Hard, or 4 Quit
  • One answer per question
  • Y to play again, anything else to stop

Outputs

  • Each question with the round, score, and current streak
  • CORRECT with the points earned, or NOPE with the right answer
  • Final points, best streak, 100-point games, and games played

Units: Points; no units.

Assumptions and limitations

Assumptions

  • Questions are made up at random by the calculator for every round.
  • An answer counts as correct when it is within 0.000001 of the exact answer.

Constraints

  • Answers may be typed as whole numbers, decimals, or a fraction such as 5/6; anything else asks again.
  • Each game is 10 questions; the level choice must be 1, 2, 3, or 4 exactly.

Known failures

  • A fraction-sum answer rounded to fewer than six decimal places may be marked wrong; type the fraction or six decimal places.
  • The totals of games played and 100-point games reset when the program is started again.

Compatibility and review

Review status
Owner-tested on a TI calculator
Tested on
Owner reports personally playing this game on a TI-84 Plus CE Python calculator; the test date, OS version, and Python App version were not recorded
What happened
Owner reported pass on the calculator. The file is published exactly as provided; this exact file has not yet been rerun on a calculator.
Dependencies
random
Suggested calculator name
MATHBLZ — you can give it another valid, unique name when you transfer it
Desktop test cases
Not available for this interactive-only source

This exact source auto-launches an interactive calculator session, so compatibility evidence comes from the recorded physical-device review rather than an importable desktop fixture.

Transfer and launch

Download the .py file, send it to your calculator with TI Connect CE as MATHBLZ or another name, then open the Python App and start a game. Press [on] to stop at any time. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.

Full installation and troubleshooting guide. Check your teacher's or exam's rules before using any program.

Version history

Enjoying a DuckieDai game? Every game and program here is free. If you would like to say thanks, you can leave a tip on Cash App ($duckiedai214) or read what tips pay for.

Independent compatibility resource: Hidden Word Scanner is independent and is not affiliated with or endorsed by Texas Instruments. TI product names describe compatibility only.

Action-count privacy: Successful downloads, preview starts, and preview completions increment same-origin aggregate counters, and so does a Yes or No answer about whether the program worked. Your browser notes that you answered; that note is never sent to the site. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.