Skip to content
Menu
Daniel J. Pierce
  • C#
  • Games
  • Graphics
  • Math
  • Python
  • Tynker
  • Unity
Daniel J. Pierce

Illogical

Posted on June 22, 2018November 11, 2019
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()

Projects

  • Procedure Platforming
  • Particle Simulator
  • AP Computer Science Paint Program
  • Maybe Good Platformer
  • Custom Gravity Test
  • Triangle Types
  • Unity Obstacle Course v1
  • Collapsing rows
  • Java Tic Tac Toe (No AI)
  • Mersenne Prime Tester
  • Rainbow
  • Pong
  • Simple Tkinter Calculator
  • Hexidecimal Converter
  • Snake eats apple
  • Protect the Galactic Empire
  • Hangman
  • Beautiful Colorful Thing
  • Four Dots
  • Frogga
  • Escape asteroids
  • Portals
  • Guess the Number 2.0
  • Illogical
  • Tic Tac Toe
  • Guess the Number
  • Ultimate Calculator 1.0.0a0
  • Prime Number Tester
  • Number Base Converter 2.0a0
  • Number Base Converter 1.1
  • Python Equation Calculator
©2025 Daniel J. Pierce | WordPress Theme by Superb WordPress Themes