Skip to content
Advertisement

Tag: while-loop

if statement loops and while loops

I’m trying to create a loop and give clues of the number the user has to guess I first tried if statements and it of course didn’t loop and I tried multiple things this was the best I could come up with but it didn’t exactly work it would keep telling me for example: it was smaller but when it

Pygame window isn’t updating

I’m writing a small python game just to learn how to use python better. I wanted to try to start using multiple scripts, as keeping all of the code in one script can get a little crowded. I made a second script, created a function main(scrn) and everything seems to be working fine. Calling that function in my main script,

How to obtain a value from inside a loop

I will be implementing multiprocessing so that the loops are occurring at the same time, but how can I make it so at the end of each iteration, I can obtain the value of westernEurope.cases and easternEurope.cases so that I can add them together Answer IMHO there is no need for multiprocessing. With a generator, your problem can be solved

Can not force stop python script using ctrl + C

Normally to force stop python script that are running, we normal just press Ctrl + C (in Interactive console). In this case, it does not stop, when I press Ctrl + C. Here is my code for this situation: I want it to force it to stop before the 20seconds is reached. Please help explain why this happened and help

Advertisement