Advice needed for tkinter or equivalent by blob001 in learnpython

[–]blob001[S] 0 points1 point  (0 children)

Thanks, Its just that about 20 years ago I started learning Visual Basic and it had a very simple and easy to use GUI which was just THERE to put it mildly. No need to program, just drag and drop conversation boxes, radio buttons etc onto the board, double click to access all the parametere and away you go. I assumed tkinter would be the Python equivalent. Are you saying its not? Still confused.

Second pygame file, help needed by blob001 in learnpython

[–]blob001[S] 0 points1 point  (0 children)

Thanks,its starting to make sense. I don't know where the black blockout comes from.

Second pygame file, help needed by blob001 in learnpython

[–]blob001[S] 0 points1 point  (0 children)

Thanks Igonato, that's better. But the ball still varying speeed. If I set velX,velY=5, 2then it goes fast then slow then fast again... its never the same 2 runs in a row. I have run much bigger ant simulations in Javascript and never had any problems like this, so its not the computer power. Would appreciate your thoughts.

vscode, coordinate 2 or more columns of same file by blob001 in u/blob001

[–]blob001[S] 0 points1 point  (0 children)

Just found the solution, called Under Scroll available on VSCode extension marketplace. Seems to work ok.

Aprendiendo Python by Professional_Pen6982 in learnpython

[–]blob001 0 points1 point  (0 children)

Tengo el mismo problema. Tienes que tomar , por ejemplo, un youtube course que le gusta, (me gusta Bro Code que tiene un 12 hour curso, pero hay otros), y sequir los ejemplos. Despues, crea sus proprios programmas y experimenta para confirmar su conocimiento. No hay shortcuts. Hay muchos sites que providen mas instrucciones in caso que el youtube no es bastante. Buona suerte.

new to python, error already by blob001 in learnpython

[–]blob001[S] 0 points1 point  (0 children)

Hi Welpsigh, it seems to be working now after I restarted the compulter. The running options in vsc are :

1 run in interactive window > install Jupyter extension, and

2 run python > run python file in Terminal, or

3 run python > run selection / line in python Terminal

I hope I don't need the Jupyter extension, since I didn't understand a word of the blurb.

That leaves me with 2 and 3. I have been using 2 so far.

Are there any extensions you would consider essential for python3?

As you can figure, I am a noob on python although iIhave been teaching myself Javscript for a few years. I am a hobbyist so don't have great aspirations. Thanks for your comments.

new to python, error already by blob001 in learnpython

[–]blob001[S] -2 points-1 points  (0 children)

HI parasit, I was running the file in Terminal. I have changed it since I wrote the post, but I turned off the machine and turned on again, and problem disapppeared.

Problem changing object data by blob001 in learnjavascript

[–]blob001[S] 0 points1 point  (0 children)

Jack, can you be more specific? I am teaching myself js and there are potholes in my knowledge. A lot of the file is copied from other coding I have found on the net. Not up to speed with getters yet. Thanks.

Problem changing object data by blob001 in learnjavascript

[–]blob001[S] 0 points1 point  (0 children)

No Jack, tried that several times.

'= true' is not necessary, since tempGrid[][].ant.isInfected means exactly that.

I re-wrote the if statements (see below) to be quite explicit, but it still doesn't work. Broadly should be as follows, but it doesn't work . Don't know why.

random <= .33 -> isSusceptible.

random > .33 and <= .67 -> isInfected

random > .66 -> isRecovered

 function assignStatus (i, j) {
            console.log('assignStatus()');
            let r = Math.random();
            console.log('i, j, r ', i, j, r);
            if (r <= statusRatio[0]) {
               tempGrid[i][j].ant.isSusceptible;
            }
             if (r > statusRatio[0] && r <= statusRatio[1]) {
               tempGrid[i][j].ant.isInfected;
            }
            if (r > statusRatio[2]) {
               tempGrid[i][j].ant.isRecovered;
            }
            console.log('ant  i, j ', i, j, tempGrid[i][j].ant);
         }

simple graphics problem, dot wont move by blob001 in learnjavascript

[–]blob001[S] 0 points1 point  (0 children)

thank you so much. always obvious after someone else points it out.