What is kahoot
Kahoot is a site for quiz that you can make on kahoot.com and play in kahoot.it. To make the quiz easily you can use a template in Excel, but to do it even more easily, you can use Python to make the Excel file, right? What I mean is that it is very tedious for me to write the text in every cell of Excel and then to go to the next row and so on. It can be not a big deal if you want to insert few questions and answer, but if you want to make a “big” quiz with 4 multiple choice for 50 question, you shoud input something like 50 x 7 = 350 data into the cell. Another boring stuff is to add the right answer. You have to give a non obvious path to the sequence of answer, so you waste other time thinking if you want that the right answer is the first, the second etc. So I think that it would be nice to make a script that make you get the data from a txt file where you put the question in a row, the multile choice in the following row, the time of the answer (you can choose it too in Kahoot) and the right answer is always the first, leaving to the script to shuffle the answer and to write the right one into the Ecel file. That is our plan, now let’s execute it.
Create a lot of questions in a second
Let’s create 30 questions in a moment with this code:
from random import choice, sample # THE DIFFERENT CATEGORIES OF ACCOUNTS finanziari = """ cassa crediti debiti crediti verso clienti assegni cambiali denaro in cassa Banca c/c Iva a nostro credito Iva a nostro debito ratei attivi ratei passivi mutui passivi mutui attivi debiti verso fornitori """ economici = """ merci in magazzino merci c/vendite merci c/acquisti automezzi fabbricati brevetti software computer arredamenti costi d'impianto interessi attivi interessi passivi spese di trasporto attrezzature impianti terreni fabbricati""" finanziari = finanziari.splitlines()[1:] economici = economici.splitlines()[1:] conti = finanziari + economici # contains the choice between type of account def pick(list_of_account): "Take an account from list_of_account, pop it, give rg=1 if finanziario of 2 if economico" account = list_of_account.pop(list_of_account.index(choice(list_of_account))) if account in finanziari: rg = 1 else: rg = 2 return account, rg def frase(): "Crea la frase in base al fatto che si tratta di un conto economico o finanziario" global R1, R2, conti, finanziari, economici conto, rg = pick(conti) return f"Il conto {conto} è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, , , 15, {rg}" for n in range(len(conti)): print(frase())
After you run the code, copy and paste into the template of Kahoot. You have to choose data in the menu and then separate the data from comma. In this code two answers are generated. In case of some problems, select the empty cells (3rd and 4th answer) in excel and clear them hitting the cancel button.
The result of the code is this:
Il conto cassa è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto assegni è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto denaro in cassa è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto terreni è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 2 Il conto Iva a nostro credito è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto debiti verso fornitori è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto mutui passivi è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto impianti è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 2 Il conto automezzi è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 2 Il conto merci c/acquisti è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 2 Il conto ratei passivi è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto arredamenti è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 2 Il conto computer è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 2 Il conto Iva a nostro debito è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto debiti è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto crediti verso clienti è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto costi d'impianto è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 2 Il conto fabbricati è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 2 Il conto ratei attivi è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto mutui attivi è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto cambiali è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto crediti è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1 Il conto Banca c/c è un conto finanziario o economico?, FINANZIARIO, ECONOMICO, 0, 0, 15, 1
When you copy this into the template:
An example with 4 choices
In this example we will have 4 choises, always the same, for different actions.
from random import choice, sample # THE DIFFERENT CATEGORIES OF ACCOUNTS costi = """ una merce acquistata un fabbricato acquistato di un'attrezzatura che ho acquistato interessi che sono maturati su un prestito ricevuto una spesa per trasporto fatturata all'impresa dal fornitore una bolletta per utenze elettriche ricevuta dall'impresa """ ricavi = """ interessi maturati su una dilazione di pagamento concessa ad un cliente una merce venduta un prodotto venduto un servizio fatturato ad un cliente """ entrate = """ l'incasso di una fattura in contanti un bonifico a favore dell'impresa """ uscite = """ un bonifico che l'impresa invia per pagare un fornitore 20 euro pagati ad un fornitore un assegno firmato per pagare un fornitore """ costi = costi.splitlines()[1:] ricavi = ricavi.splitlines()[1:] entrate = entrate.splitlines()[1:] uscite = uscite.splitlines()[1:] azioni = costi + ricavi + entrate + uscite # OPTIONS R1 = "UN COSTO" R2 = "UN RICAVO" R3 = "UN'ENTRATA" R4 = "UN'USCITA" # contains the choice between type of account def pick(list_of_account): "Take an account from list_of_account, pop it, give rg=1 if finanziario of 2 if economico" action = list_of_account.pop(list_of_account.index(choice(list_of_account))) if action in costi: rg = 1 elif action in ricavi: rg = 2 elif action in entrate: rg = 3 elif action in uscite: rg = 4 return action, rg def frase(): "Crea la frase in base al fatto che si tratta di un conto economico o finanziario" global R1, R2, azioni, costi, ricavi, entrate, uscite azione, rg = pick(azioni) return f"Il valore di {azione} è?, {R1}, {R2}, {R3} , {R4}, 20, {rg}" for n in range(len(azioni)): print(frase())
What we get is this:
Il valore di una merce venduta è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 2 Il valore di un assegno firmato per pagare un fornitore è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 4 Il valore di una merce acquistata è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 1 Il valore di un fabbricato acquistato è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 1 Il valore di interessi che sono maturati su un prestito ricevuto è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 1 Il valore di una spesa per trasporto fatturata all'impresa dal fornitore è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 1 Il valore di un bonifico che l'impresa invia per pagare un fornitore è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 4 Il valore di una bolletta per utenze elettriche ricevuta dall'impresa è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 1 Il valore di l'incasso di una fattura in contanti è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 3 Il valore di interessi maturati su una dilazione di pagamento concessa ad un cliente è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 2 Il valore di un bonifico a favore dell'impresa è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 3 Il valore di 20 euro pagati ad un fornitore è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 4 Il valore di un prodotto venduto è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 2 Il valore di di un'attrezzatura che ho acquistato è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 1 Il valore di un servizio fatturato ad un cliente è un costo, un ricavo, un'entrata o un'uscita?, COSTO, RICAVO, ENTRATA , USCITA, 20, 2 >>>
As before, copy this code into the excel template (importing data in a way that it will separate the data with the comma as separator, and then upload it into the kahoot quiz. Have fun with your quizzes!