diff --git a/TODO.txt b/TODO.txt index 5ed3f59..82d0c3c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,8 +1,8 @@ v get a single python file with all questions, hints and answers in a single dictionary. v implement 3 functions: question, hint and solution, printing the required question, hint and solution in an `initialise.py` file. - +v initialise must also have a pick() function for a random game. + produce one jupyter with all the questions, the initialise.py in the first cell creating the full notebook: numpy_100_consecutive.ipynb -+ produce one jupyter notebook with the random game. initialise must also have a pick() function to get a random question: numpy_100_random.ipynb. ++ produce one jupyter notebook with the random game: numpy_100_random.ipynb. + produce the method to create the md files (questions, questions with hints, questions with solutions, questions with hints and solution) + add to this method the a cli interface for quick manipulation. + produce and leave the files created with the cli. diff --git a/initalise.py b/initalise.py index 46e4d92..f193fec 100644 --- a/initalise.py +++ b/initalise.py @@ -1,8 +1,10 @@ +import numpy as np + from questsions_dict import qha def question(n): - print(qha[f'q{n}']) + print(f'{n}. ' + qha[f'q{n}']) def hint(n): @@ -11,3 +13,8 @@ def hint(n): def answer(n): print(qha[f'a{n}']) + + +def pick(): + n = np.random.randint(1, 100) + question(n)