I have this code: https://www.online-python.com/ldH1Xsk0Wn (It was to much code to paste all of it here)
Some of it is:
lightSymbollist = ["\o/", "\ /"]
def countdown(t):
print("\n" + "Light will turn off in: " + "\n")
while t:
mins, secs = divmod(t, 60)
timer = '{:02d}:{:02d}'.format(mins, secs)
print(timer, end="\r")
time.sleep(1)
t -= 1
if t == 0:
light()
def printOut():
global lightGuess
lightGuess = input("Which light do you think will be turned off? (1-5): ").strip()
get_random_values()
countdown(int(t))
guessLight()
points()
oneMoreTime()
What I want to do with it is use the list lightSymbollist. In def countdown I want to print the first element (\o/) five times. Then the countdown starts. When the countdown is finished I want to clear the two lines (countdown and the five elements) and print a new line from the list where the light guessed in def printOut "lightGuess = input("Which light do you think will be turned off? (1-5): ").strip()" is turned off.
So if the guess is light two the new print will be: \o/ \ / \o/ \o/ \o/
Simply a graphic illustration of which light that is turned off.
(Also other suggestions on how to make the code cleaner is appreciated, learning python atm. Haven't put down comments in my code, but I hope it is understandable what my goals with it are since it still is simple.)
Haven't tried much since I am not sure where it's best to start.