Skip to content

kw-andy/kidding_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

While learning Rust, Canop showed me the program he did for his kids in Rust, that one, Kidding.

As a quite simple program, I've decided to translate it into Python, to understand better Rust and delve further into Python. There are a few things I need to update some of the program subtleties only exist in Rust, and needs further adaptation in Python. Also some part are not enough pythonic yet and will be upgraded.

It is asking questions like 35 + 12 = ? in a loop.

The code is easy to tune and change with kid, it's a basis for a coding play too.

screenshot

upgrade for que_ans
  • future upgrade
  • use in the new method, the enum instead of using if
done
  • use the lines below for change when randval == 3
numbers = [randrange(1, 17) for _ in range(randrange(2,6))]
question = 'The question is: ' + ' + '.join(map(str, numbers))
answer = sum(numbers)
upgrade for question
  • future upgrade
  • Use a dictionnary for the switch board, if possible

About

Program to teach kids to do mental calculation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages