Hi all… New to coding here. Trying again for a specific purpose, but the purpose keeps growing!
Originally I was simply trying to populate a googlesheets spreadsheet with data outputted from a simple python script. This I managed eventually! (yay me!).
However, my project has evolved, and I fear my needs have far surpassed my capabilities!
So… The question at hand - developing an interactive number grid. As I mentioned i’ve been dabbling with python, so would ideally like to continue on in this language.
What I am aiming to achieve, is a number grid from 1 up to potentially 10000, with specific numbers highlighted. The grid would be able to customize on the fly preferably, by adjusting the amount of columns.
Is anyone able to give some advice, or point me at some appropriate tutorials or sites, or tell me if i’m barking up the wrong tree entirely
So the number grid would just be a generic 1-xxxxx number grid (as per attached image).
In this instance prime numbers are selected, but ideally you could either manually highlight the numbers or the running instance would have an input field that would parse comma separated values that would highlight accordingly. In the meantime, hard coding the highlighted numbers is what I have been doing.
I’m spitballing and reading on the fly, so will elaborate as I figure it out lol!
Thanks for moving post to appropriate area and the questions! Helps me rationalize my own thoughts as well!
Heh, thanks! Connecting to the google api, and populating sheets was a fun mini project. Sheets was suitable originally for what I was doing (basically just outputting the results of a series of equations into appropriate cells), but yes, the project evolved and now GoogleSheets just isn’t suitable anymore.
Everything i’ve done thus far has just been connecting, equations and outputting text and the program ends. What i’m trying to achieve now (a functional GUI effectively) seems a lot more intimidating! But this may just be because I don’t understand how it works
I’ve often wanted to learn to code (I’m a Cisco/Windows Server engineer by trade), but I’m very goal focused - so I generally don’t start learning until I’m working towards a practical end.
Will go read up on the prime algorithm, and work with what you’ve given me so far - and see what I can work out!
It turned out not really practical, as it takes about 650 ms for my algorithm to calculate primes up to 1,000,000 but codepen blocks any attempt to generate a million table cells with message “We stopped your script as it looks like you have infinite loop”.
Anyway, thanks for the idea and hopefully you will find anything interesting in my example
Hah! So I take it “interactive number grids” are a common theme among new members are they? Sorry if I missed existing posts
Looking at what you’ve created there, it’s similar to what i’ve been imagining - the prime difference (no pun intended!) is that what i’ve been trying to create has the ability to customize the grid columns, either on the fly via a click and drag method, or to specify prior to generating the grid, how many columns you would like.
On the fly would be optimal as it would allow quick and easy change of view for spotting emerging patterns.
Thanks for this! I haven’t really looked into the javascript side of things yet, so this will give me a template to begin working with from another point of view!
Have found some python code that looks really interesting. Using tkinter widgets to create an interactive GUI. I’m pulling apart code and reading how the class structures work on all the different aspects at the moment
Between that, and the code that you guys have shown me, perhaps I can figure a way to do this!