(Python) Why is my while loop not working?
Question:
I have been working on an operating system inside of Python and I am starting off with the system booting code. I have a while loop that executes when the variable "Booting" = 1. Inside the while loop is a script that prints "Booting" then replaces that with "Booting.", then it gets replaced with "Booting.." and so on until it reaches "Booting….." which should make it reset to "Booting" and reset the cycle. Instead, it just stops at "Booting….." and doesn’t continue to reset the cycle.
Here is the code:
import time
import sys
Booting = 1
while Booting == 1:
print("Booting")
sys.stdout.write("
I have been working on an operating system inside of Python and I am starting off with the system booting code. I have a while loop that executes when the variable "Booting" = 1. Inside the while loop is a script that prints "Booting" then replaces that with "Booting.", then it gets replaced with "Booting.." and so on until it reaches "Booting….." which should make it reset to "Booting" and reset the cycle. Instead, it just stops at "Booting….." and doesn’t continue to reset the cycle.
Here is the code:
import time
import sys
Booting = 1
while Booting == 1:
print("Booting")
sys.stdout.write("