School class schedule and multidimensional arrays

Hello, I'm trying to develop a "Search Class App" for my school, which selecting:

  • day
  • hour
  • class
    should give the room where the class is.

Normally, in C++ or Phyton I would use a 3d array where input data are the indices and the number of the room is the content of the array to output.
I went a bit mental trying to implement this concept into dictionaries and lists.
Any suggestion on how to do it in a easy way?

thank you in advance

Show an example of your data...

Use the local sqlite database, put your data into a table and use sql to query your data

This select statement then will give you the room where the class is for a selected day and hour

SELECT room FROM myTable
WHERE day = selected day
AND hour = selected hour
AND class = selected class

My sqlite extension follows the KISS principle - keep it simple stupid, there are also other sqlite extensions

Taifun

You can also do this with a 4 column Google Sheet:

  • day
  • hour
  • class
  • room

Download the whole sheet as CSV table, convert it to a list of lists, and use the AI2 filter blocks successively on each column until you have the row that matches your day, hour, class.

if you prefer to use a Google Sheet, then you also can use gviz to query your data directly

Taifun

1 Like

Sorry, there is not yet any format for the data, I can choose any.

Good hint, thank you

It sounds great, I'm going to try to do this. Thank you.