I have several files which contain a list of questions to be compiled in Latex. I want to write a Python script that does the following.
I want to choose a set number of questions randomly from each file and save them to a new file 'exam1.tex'. For example, I want to be able to select 10 random questions from bank1 and 20 random questions from bank2, etc.
I will share some examples of files with shortlisted candidates.
Notes:
Each question is wrapped in an 'environment.'
The following environments are used:
\\begin{ question}
[...]
\\end{ question}
\\begin{ matching}
[...]
\\end{ matching}
However, some questions are joined together into groups in the following manner:
\\begin{ block} [questions=2]
\\begin{ question}
[...]
\\end{ question}
\\begin{ question}
[...]
\\end{ question}
\\end{ block}
Ideally, I'd like to keep grouped questions together. So, if one grouped question gets randomly selected, the entire group of questions gets included.
About the recuiterMember since Nov 11, 2022 Benzsmark Facility Services India Pvt Ltd Bmfs
from Punjab, Pakistan