Jan-17-2025, 10:50 AM
This is my current code ive started coding again as i stopped for a few years due to mental health ive searched but cant find how to end a quiz when making can anyone help please Thanking all of you
score=0 import sys import time def typing_effect(text, speed=0.1): for char in text: sys.stdout.write(char) sys.stdout.flush() time.sleep(speed) text = "Welcome to the homebrew quiz. This will test your knowledge of homebrewing." typing_effect(text, 0.1) print("What homebrew is used to mod a ps3/4/5?") print("A: Goldhen") print("B: Steam") print("C: USB Loader GX") print("D: Goldeneye") answer = input("What is your answer?") if answer == "A": print("Correct!") score=score +1 elif answer == "B": print("Incorrect!") elif answer == "C": print("Incorrect!") elif answer == "D": print("Incorrect!") def typing_effect(text, speed=0.1): for char in text: sys.stdout.write(char) sys.stdout.flush() time.sleep(speed) text = "Next question!" typing_effect(text, 0.1) print("What homebrew can be used to homebrew a Nintendo Wii?") print("A: T-Rush") print("B: Valve Index CD1") print("C: NANDS SYSTEM") print("D: USB Loader GX")