Skip to content

Tag: while-loop

Problem: While loop won’t re-run the program properly

Result: Currently, my program will print a score depending on what the user enters. After the first input, ‘fazli’ the score was 17. My while loop is supposed to keep running until the user enters nothing. The problem is my while loop I believe. It won’t make a new score, it only copies the …

How can I use the content of a file as a condition?

I installed AutoKey on my computer so I can execute python files with the keyboard, and what I want to do is execute a script as a loop but also being able to stop it. The script presses the “d” key on my keyboard, waits around 2.4 seconds, and then presses “s”. What I thought would be…