import time def clearChat(): pass def haskey(dict, key): try: dict[key] return True except: return False def main(): question_answers = {0: ('What is the answer?', ['the answer', None]), 1: ('2+2=4 and 2+2=FISH, what is 2+2?', ['2+2=5', '5']),\ 2: ('fasduygviehghjk', ['tuta']),\ 3: ('No Question', ['''nono''']),\ 4: ('Does this question make sense?', ['lol']), 64: ('This is a question', ["I don't waste my time on stupid questions."]),\ 65: ('Is this fake question a fake question or a real question?', ['fake and real', 'this is ridiculous']),\ float('inf'): ('Wait, What?', ['What was the question again?', 'Wait, What?'])} question_for_numbs= {5: '63', 66: 'inf'} intro = "Make sense, huh, what's the fun in making sense" for i in range(len(intro)): print(intro[i], end='') time.sleep(0.05) print('') print("Press ENTER to continue") input() def choose(): if question_int == float('inf'): return ('Wait, What?', ['What is the question again?']) return question_answers[question_int] question_int = 0 numb = '0' inf = 0 while True: clearChat() if inf == 1: break elif haskey(question_for_numbs, question_int): x = [False, [question_for_numbs[question_int]]] print('Question #?: What question are we on?') try: question_int = int(question_for_numbs[question_int]) except: question_int = float(question_for_numbs[question_int]) else: x = choose() print('Question #' + str(question_int) + ': ' + x[0]) x = choose() if x[0] == float(inf): inf = 1 while True: try: answer = input("Guess #" + numb + ': ') except KeyboardInterrupt: answer = None numb = str(int(numb) + 1) if answer in x[1]: print("Correct! Try Agian!") print("Press ENTER to continue") input() break else: print("Wrong! Try Agian!") question_int += 1 print("You completed the test in " + str(numb) + ' tries. Congratulations!') while True: continue main()