5 Antworten
+ 1
so you want x process to run while you see the input question on screen? There is no simple way to do this, not even using threading(works if assumed input is a single keypress) since the while loops multiple times per second and every loop refreshes the input dialog, such only single keypress is valid option. You might be able to do this with a more complex OOP code but not in a simple way
+ 4
Loop is like a staircase,you can use it up to the usable part,if a 6 stroyed building has Staircase up to 4th floor,then you can go up to 4th floor,but if your desired destination is 3rd floor,then you stop on 3rd floor,though you can move up to 4th floor,if your destination is 6th floor then you cancel your journey at the beginning or not start your journey.
If the building has Staircase up to 6th floor then you can move as many times as you wish or for unlimited time.
Please read my simple example here:
https://www.sololearn.com/discuss/1086266/?ref=app
+ 2
loop should stop if it has no entered one in input()
0
do you mean something like this?
while True:
answer = input("something")
if answer != ""
break
didnt test the integrity of that code but i think you get the gist of it
0
replace true with input, i mean this. @Markus