Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Enzo Villarama
- =============================================
- This Is a Modular Programme
- =============================================
- """
- import time
- def page_1():
- print("\nEnzo Villarama\nThis Is a Modular Program <Page 1>")
- Options = print("""============================================
- 1. Cypher / Decypher
- 2.
- 3. Rock / Paper / Scissors
- 4. Tax Calculation
- 5. Calculator
- 6. Page Select
- ============================================
- Help <H>
- """)
- Ask = input("Enter Choice: ").strip()
- print("========================================")
- if Ask == "1":
- module_1()
- elif Ask == "2":
- module_2()
- elif Ask == "3":
- module_3()()
- elif Ask == "4":
- module_4()()
- elif Ask == "5":
- module_5()()
- elif Ask == "6":
- page_index()
- elif Ask == "h":
- help()
- elif Ask == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- try:
- print("Invalid Input")
- try:
- question = input("Do you want to quit the program? ")
- question = question.lower()
- if question == "yes":
- print("Quiting Program\n",
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- elif question == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- print("========================================")
- page_1()
- except ValueError:
- page_1()
- except ValueError:
- page_1()
- def page_2(): # ADD MORE MODULES :)
- print("\nEnzo Villarama\nThis Is a Modular Program <Page 2>")
- options = print("""============================================
- 1. Random Binary Number Generator
- 2. Evolution of Text
- 3. Evolution of Text Re-work
- 4. O's & 1's
- 5.
- 6. Page Select
- ============================================
- Help <H>
- """)
- Ask = input("Enter Choice: ").strip()
- print("========================================")
- if Ask == "1":
- module_6()()
- elif Ask == "2":
- module_7()()
- elif Ask == "3":
- module_8()()
- elif Ask == "4":
- module_9()()
- elif Ask == "5":
- module_10()()
- elif Ask == "6":
- page_index()
- elif Ask == "h":
- help()
- elif Ask == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- try:
- print("Invalid Input")
- try:
- question = input("Do you want to quit the program? ")
- question = question.lower()
- if question == "yes":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- elif question == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- print("========================================")
- page_2()
- except ValueError:
- page_2()
- except ValueError:
- page_2()
- def page_3(): # ADD MORE MODULES :)
- print("\nEnzo Villarama\nThis Is a Modular Program <Page 3>")
- options = print("""============================================
- 1. Computing Revision Quiz V1
- 2. Computing Revision Quiz V2 (TBF)
- 3. Description Generator
- 4. Randomness
- 5.
- 6. Page Select
- ============================================
- Help <H>
- """)
- Ask = input("Enter Choice: ").strip()
- print("========================================")
- if Ask == "1":
- module_11()()
- elif Ask == "2":
- module_12()()
- elif Ask == "3":
- module_13()()
- elif Ask == "4":
- module_14()()
- elif Ask == "5":
- module_15()()
- elif Ask == "6":
- page_index()
- elif Ask == "h":
- help()
- elif Ask == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- try:
- print("Invalid Input")
- try:
- question = input("Do you want to quit the program? ")
- question = question.lower()
- if question == "yes":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- elif question == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- print("========================================")
- page_3()
- except ValueError:
- page_3()
- except ValueError:
- page_3()
- def page_4(): # ADD MORE MODULES :)
- print("\nEnzo Villarama\nThis Is a Modular Program <Page 4>")
- options = print("""============================================
- 1.
- 2.
- 3.
- 4.
- 5.
- 6. Page Select
- ============================================
- Help <H>
- """)
- Ask = input("Enter Choice: ").strip()
- print("========================================")
- if Ask == "1":
- module_16()()
- elif Ask == "2":
- module_17()()
- elif Ask == "3":
- module_18()()
- elif Ask == "4":
- module_19()()
- elif Ask == "5":
- module_20()()
- elif Ask == "6":
- page_index()
- elif Ask == "h":
- help()
- elif Ask == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4...")
- time.sleep(1)
- print("3..")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- try:
- print("Invalid Input")
- try:
- question = input("Do you want to quit the program? ")
- question = question.lower()
- if question == "yes":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- elif question == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- print("========================================")
- page_4()
- except ValueError:
- page_4()
- except ValueError:
- page_4()
- def page_5(): # ADD MORE MODULES :)
- print("\nEnzo Villarama\nThis Is a Modular Program <Page 4>")
- options = print("""============================================
- 1.
- 2.
- 3.
- 4.
- 5.
- 6. Page Select
- ============================================
- Help <H>
- """)
- Ask = input("Enter Choice: ").strip()
- print("========================================")
- if Ask == "1":
- module_21()()
- elif Ask == "2":
- module_22()
- elif Ask == "3":
- module_23()
- elif Ask == "4":
- module_24()
- elif Ask == "5":
- module_25()
- elif Ask == "6":
- page_index()
- elif Ask == "h":
- help()
- elif Ask == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- try:
- print("Invalid Input")
- try:
- question = input("Do you want to quit the program? ")
- question = question.lower()
- if question == "yes":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1..")
- time.sleep(1)
- print("=" * 40)
- quit()
- elif question == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- print("========================================")
- page_5()
- except ValueError:
- page_5()
- except ValueError:
- page_5()
- def page_index(): # Add more Pages
- print("\nEnzo Villarama\nThis Is a Modular Program <Page Select>")
- options = print("""============================================
- 1. Page 1 -->
- 2. Page 2 -->
- 3. Page 3 -->
- 4. Page 4 -->
- 5. Page 5 -->
- ============================================
- Help <H>
- """)
- Ask = input("Enter Choice: ").strip()
- print("========================================")
- if Ask == "1":
- page_1()
- elif Ask == "2":
- page_2()
- elif Ask == "3":
- page_3()
- elif Ask == "4":
- page_4()
- elif Ask == "5":
- page_5()
- elif Ask == "h":
- help()
- elif Ask == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- try:
- print("Invalid Input")
- try:
- question = input("Do you want to quit the program? ")
- question = question.lower()
- if question == "yes":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- elif question == "quit":
- print('Quiting Program\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- quit()
- else:
- print("========================================")
- page_index()
- except ValueError:
- page_index()
- except ValueError:
- page_index()
- def module_1(): # Finished and Working :)
- import random
- title = "| Caesar Cipher Encryption |"
- extras = len(title)
- banner = "=" * extras
- print("\n",banner,"\n",title," \n",banner,"\n", sep = '')
- try:
- shift = random.randrange(-999,999)
- word = input("Please enter a word: ")
- word = word.lower().strip()
- cypher = dict(zip("abcdefghijklmnopqrstuvwxyz",range(26)))
- inputypher = dict(zip(range(26),"abcdefghijklmnopqrstuvwxyz"))
- if word.isdigit():
- print("\nInvalid Input")
- try:
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_1()
- else:
- page_1()
- except ValueError:
- print("\nInvalid Input")
- try:
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_1()
- else:
- page_1()
- except ValueError:
- page_1()
- else:
- # encypher
- cyphertext = ""
- for index in word:
- if index.isalpha():
- cyphertext += inputypher[(cypher[index] + shift) % 26]
- else:
- cyphertext += index
- # inputypher
- plaintext = ""
- for index in cyphertext:
- if index.isalpha():
- plaintext += inputypher[(cypher[index] - shift) % 26]
- else:
- plaintext += index
- print("\nEncrypted Text:", cyphertext,
- "\ninputrypted Text:", plaintext,"\n")
- try:
- question = input("Again? ")
- question = question.lower()
- if question == "yes":
- module_1()
- else:
- print("============================================")
- page_1()
- except ValueError:
- page_1()
- except ValueError:
- try:
- print("\nInvalid Input")
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_1()
- else:
- print("============================================")
- page_1()
- except ValueError:
- print("============================================")
- page_1()
- print("============================================")
- page_1()
- def module_2():
- print("NOT YET WORKING")
- page_1()
- def module_3(): # Finished and Working :)
- from random import randint
- import time
- options = ["Rock", "Paper", "Scissors"]
- computer = options[randint(0,2)]
- player = False
- print('Rock, Paper, Scissors\n',
- 'How to Play:\n', '=' * 40,
- '\nType your choice of:\n',
- 'Rock, Paper or Scissors\n',
- 'Any other input will prompt\n',
- 'you to quit the game\n',
- 'Type "quit" if you really wish to\n',
- 'quit the game\n',
- '=' * 40, sep = "")
- while player == False:
- player = input("Rock, Paper, Scissors? ")
- if player == computer:
- print("Tie!\n")
- elif player == "Rock":
- if computer == "Paper":
- print("You lose!", computer, "covers Rock \n")
- else:
- print("You win! Rock smashes", computer,"\n")
- elif player == "rock":
- if computer == "Paper":
- print("You lose!", computer, "covers Rock \n")
- else:
- print("You win! Rock smashes", computer,"\n")
- elif player == "Paper":
- if computer == "Scissors":
- print("You lose!", computer, "cut Paper \n")
- else:
- print("You win! Paper covers", computer,"\n")
- elif player == "paper":
- if computer == "Scissors":
- print("You lose!", computer, "cut Paper \n")
- else:
- print("You win! Paper covers", computer,"\n")
- elif player == "Scissors":
- if computer == "Rock":
- print("You lose...", computer, "smashes Scissors \n")
- else:
- print("You win! Scissors cuts", computer,"\n")
- elif player == "scissors":
- if computer == "Rock":
- print("You lose...", computer, "smashes Scissors \n")
- else:
- print("You win! Scissors cuts", computer,"\n")
- elif player == "quit":
- print("=" * 40,
- '\nQuiting Game......\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_1()
- elif player == "Quit":
- print("============================================")
- print("=" * 40,
- '\nQuiting Game......\n',
- '=' * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_1()
- else:
- print("That's not a valid play. Check your spelling!\n")
- question = input("Would you like to quit game? ").lower()
- if question == "yes":
- player = True
- print("============================================")
- page_1()
- else:
- player = False
- #player was set to True, but we want it to be False so the loop continues
- player = False
- computer = options[randint(0,2)]
- def module_4(): #Finished and Working :)
- try:
- print("==================================================")
- salary = int(input("Salary Amount: "))
- no_tax_boundary = int(input("No Tax Boundary: "))
- rate1_boundary = int(input("Rate Boundary: "))
- rate1 = float(input("Tax Rate 1 (%): "))
- rate2 = float(input("Tax Rate 2 (%): "))
- rate_1 = rate1_boundary - no_tax_boundary
- Tax1 = round(rate_1 / 100 * rate1)
- rate_2 = salary - rate1_boundary
- Tax2 = round(rate_2 / 100 * rate2)
- print("==================================================")
- print("Salary: $", salary, sep = "")
- print("Amount to be taxed at: ", rate1, "%: $", rate_1, sep = "")
- print("Tax at rate 1: $", Tax1, sep = "")
- print("Amount to be taxed at: ", rate2, "%: $", rate_2, sep = "")
- print("Tax at rate 1: $", Tax2, sep = "")
- print("==================================================")
- Total_tax = Tax1 + Tax2
- Net_Pay = salary - Total_tax
- print("Total tax: $", Total_tax, "\n\nNet pay: $", Net_Pay, sep = "")
- print("==================================================")
- try:
- question = input("Another Calculation? ")
- question = question.lower()
- if question == "yes":
- module_4()()
- else:
- print("============================================")
- page_1()
- except ValueError:
- page_1()
- except ValueError:
- try:
- print("Invalid Input")
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_4()()
- else:
- print("============================================")
- page_1()
- except ValueError:
- page_1()
- page_1()
- def module_5(): # Finished and Working :)
- try:
- print("Calculator\n============================================")
- q = input("Enter your mathimatical equation: ")
- q = str(eval(q))
- print("= " + q)
- print("============================================")
- try:
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_5()()
- else:
- print("============================================")
- page_1()
- except ValueError:
- print("Invalid Input")
- try:
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_5()()
- else:
- print("============================================")
- page_1()
- except ValueError:
- page_1()
- except ValueError:
- print("Invalid Input")
- try:
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_5()()
- else:
- print("============================================")
- page_1()
- except ValueError:
- page_1()
- page_1()
- def module_6():
- import random
- try:
- number_of_randomness = int(input("How many binary numbers would you like to generate: "))
- print("=========================================================")
- k = True
- i = 0
- while k == True:
- a = random.randrange(0,2)
- b = random.randrange(0,2)
- c = random.randrange(0,2)
- d = random.randrange(0,2)
- e = random.randrange(0,2)
- f = random.randrange(0,2)
- g = random.randrange(0,2)
- h = random.randrange(0,2)
- print(a,b,c,d,e,f,g,h, sep = "")
- i = i + 1
- if i == number_of_randomness:
- k = False
- try:
- print("=========================================================")
- question = input("Would you like to generate more random binary numbers? ")
- question = question.lower()
- if question == "yes":
- module_6()()
- else:
- print("=========================================================")
- page_2()
- except ValueError:
- try:
- print("Invalid Input")
- question = input("Would you like to try again? ")
- question = question.lower()
- print("=========================================================")
- if question == "yes":
- module_6()()
- else:
- print("=========================================================")
- page_2()
- except ValueError:
- page_2()
- except ValueError:
- try:
- print("Invalid Input")
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_6()()
- else:
- print("=========================================================")
- page_2()
- except ValueError:
- page_2()
- page_2()
- def module_7():
- print("\nEvolution of Text\n" + "=" * 40)
- try:
- import string
- import random
- import time
- possible_characters = string.ascii_lowercase + string.digits + string.ascii_uppercase + " .,!?;:\@#$%^&*()[]{}|/\'+-๑\""
- target = input("Enter your target text: ")
- print("")
- if target == "quit":
- page_2()
- else:
- attempt = ''.join(random.choice(possible_characters) for i in range(len(target)))
- next_attempt = ''
- completed = False
- generation = 0
- while completed == False:
- print(attempt)
- next_attempt = ''
- completed = True
- for i in range(len(target)):
- if attempt[i] != target[i]:
- completed = False
- next_attempt += random.choice(possible_characters)
- else:
- next_attempt += target[i]
- generation += 1
- attempt = next_attempt
- time.sleep(0.1)
- print("=" * 40 + "\nTarget matched! That took " + str(generation) + " Passes")
- try:
- question = input("Again? ")
- print("=" * 40)
- question = question.lower()
- if question == "yes":
- module_7()()
- except ValueError:
- print("Invalid Input\Taking you back to main Module")
- page_2()
- except ValueError:
- print("Please Try again")
- module_7()()
- page_2()
- def module_8():
- print("\nEvolution of Text Re-work\n" + "=" * 40)
- try:
- import string
- import random
- import time
- possible_characters = string.ascii_lowercase * 25 + string.digits * 25 + string.ascii_uppercase * 25 + """
- .,!?;:\@#$%^&*()[]{}|/\'+-๑•ิ.•ั๑۩۞۩๑♬✿.。.:*★☆εїз℡❣·۰•●○●ōゃ♥♡๑۩ﺴ☜☞☎☏♡⊙◎☺☻✖╄ஐﻬ►◄▧▨♨◐◑↔
- ↕▪▫☼♦▀▄█▌▐░▒▬♦◊◦☼♠♣▣▤▥▦▩◘◙◈♫♬♪♩♭♪の☆→あぃ£❤#@&*❁❀✿✾❃✺❇❈❊❉✱✲✩✫✬✭✮✰☆★✪¤☼ ☽☾
- ❤♡ღ☻☺❂◕⊕☉ΘoO♋☯㊝⊙◎◑◐۰•●▪▫。゚๑☜☞☂♨☎☏×÷=≠≒∞ˇ±√⊥▶▷◀◁☀☁☂☃☄★☆☇☈☉☊☋☌☍☑☒☢☸☹☺☻☼♠♡
- ♢♣♤♥♦♧♨♩✙✈✉✌✁♝♞♯♩♪♫♬♭♮☎☏☪♈♨₪™♂✿♥の↑↓←→↖↗↙↘㊣◎○●⊕⊙○ △▲☆★◇◆■□▽▼§¥〒¢£※♀♂&⁂℡ↂ░
- ▣▤▥▦▧✐✌✍✡✓✔✕✖♂♀♥♡☜☞☎☏⊙◎☺☻►◄▧▨♨◐◑↔↕♥♡▪▫☼♦▀▄█▐░▒▬♦◊◘◙◦☼♠♣▣▤▥▦▩◘◙◈♫♬♪♩♭♪✄☪☣☢☠░ ▒▬♦◊◦♠
- ♣▣۰•●❤●•۰►◄▧▨♨◐◑↔↕▪▫☼♦♧♡♂♀♠♣♥❤☜☞☎☏⊙◎☺☻☼▧▨♨◐◑↔↕▪▒◊◦▣▤▥ ▦▩◘◈◇♬♪♩♭♪の★☆→あぃ£Ю〓§♤♥▶¤๑⊹⊱⋛⋌⋚⊰⊹
- ๑۩۩۩۩๑๑۩۞۩๑✲❈✿✲❈➹~.◕‿-❣✚✪✣✤✥✦❉❥❦❧❃❂❁❀✄☪☣☢☠☭ღ▶▷◀◁☀☁☂☃☄★☆☇☈⊙☊☋☌☍ⓛⓞⓥ
- ⓔ๑•ิ.•ั๑ ๑۩۞۩๑ ♬✿☉♡♢♣♤♥♦♧♨♩✙✈✉✌✁✎✐❀✰❁❤❥❦❧➳➽εїз℡❣·۰•●○●ゃōゃ♥♡๑۩ﺴ☜☞☎☏♡⊙◎☺☻✖╄ஐﻬ
- ◄▧▨♨◐◑↔↕▪▫ ☼▬♦◊◦☼♠♣▣▤▩◘◙◈♫♬♪♩♭♪の☆→あぃ£❤❁❀✿✾❃✺❇❈❊❉✱✲✩✫✬✭✰★✪¤☼☀☽☾❤♡ღ☻☺❂◕⊕☉Θo
- O♋☯㊝⊙◎◑◐۰•●▪▫。゚๑☜☞☂♨☎☏▶▷◀◁☀☁☂☃☄☇☈☉☊☋☌☍☑☒☢☸☹☺☻☼☽☾♠♝♞♯♩♪♫♬♭♮☎☏☪♈♨º₪¤큐«»™♂
- ✿♥の↑↓←→↖↗↙↘㊣◎○● ⊙○△▲☆★◇◆■□▽▼§¥〒¢£※♀♂©®⁂ↂ░▣▤▦▧✐✌✍✡✓✔✕✖♂♀♥♡☜☞☎☏⊙◎☺☻►◄▧▨♨◐◑↔↕♥♡▪
- ▫☼♦▬◊◘◙◦☼♠♣▣▤▦▩◘◙◈♫ ♬♪♩♭♪✄☪☣☢☠㊊㊋㊌㊍㊎㊏㊐㊑㊒㊓㊔㊕㊖㊗㊘㊜㊝㊞㊟㊠㊡㊢㊣㊤㊥㊦㊧㊨㊩㊪㊫㊬㊭㊮㊯㊰
- ✗✘✚✪✣✤✥✦✧✩✫✬✭✮✯✰✱✲✳❃❂❁❀✿✾✽✼✻✺✹✸✷✶✵✴❄❅❆❇❈❉❊❋❖☀☂☁【】┲❣✪✤✥✦❉
- ❥❦❧❃❂❁❀✄☪☣☢☠☭♈➸✓✔✕✖:◢◣◥◤▽▧▨▣▤▦▩◘◙▓▒░™凸の๑۞๑๑ﺴ۩๑o‧”’‧o❆べò⊹⊱⋛⋋⋌⋚⊰⊹ⓛⓞⓥⓔ☀☼☜☞⊙® ◈♦
- ◊◦◇◆εїз❃❂❁❀✿✾✽✼✻✺✹✸✶✵✴❄❅❆❇❈❉❊❋❖❤❥❦❧↔↕▪→︷╅╊✿´`¸•´¯❤︺´¯`••.¸¸.•´¯`•.•●•۰.•
- ´¯`•.•• ••.•´¯`•.••—¤÷`¤*´÷¤——•·÷·•— ①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄ
- ⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ⊙▂⊙✖づ ̄³づc”-*x-๏_๏-◐o◑⊙…⊙๏-ิ_•๏•ิ
- ︶︹
- """
- target = input("Enter your target text: ")
- print("")
- if target == "quit":
- page_2()
- else:
- attempt = ''.join(random.choice(possible_characters) for i in range(len(target)))
- next_attempt = ''
- completed = False
- generation = 0
- while completed == False:
- print(attempt)
- next_attempt = ''
- completed = True
- for i in range(len(target)):
- if attempt[i] != target[i]:
- completed = False
- next_attempt += random.choice(possible_characters)
- else:
- next_attempt += target[i]
- generation += 1
- attempt = next_attempt
- time.sleep(0.1)
- print("=" * 40 + "\nTarget matched! That took " + str(generation) + " Passes")
- try:
- question = input("Again? ")
- print("=" * 40)
- question = question.lower()
- if question == "yes":
- module_8()()
- except ValueError:
- print("Invalid Input\Taking you back to main Module")
- page_2()
- except ValueError:
- print("Please Try again")
- module_8()()
- page_2()
- def module_9():
- print("\n0's & 1's\n" + "=" * 40)
- try:
- import string
- import random
- import time
- possible_characters = string.digits
- target = input("Enter your target text: ")
- print("")
- if target == "quit":
- page_2()
- else:
- attempt = ''.join(random.choice(possible_characters) for i in range(len(target)))
- next_attempt = ''
- completed = False
- generation = 0
- while completed == False:
- print(attempt)
- next_attempt = ''
- completed = True
- for i in range(len(target)):
- if attempt[i] != target[i]:
- completed = False
- next_attempt += random.choice(possible_characters)
- else:
- next_attempt += target[i]
- generation += 1
- attempt = next_attempt
- time.sleep(0.5)
- print("=" * 40 + "\nTarget matched! That took " + str(generation) + " Passes")
- try:
- question = input("Again? ")
- print("=" * 40)
- question = question.lower()
- if question == "yes":
- module_9()()
- except ValueError:
- print("Invalid Input\Taking you back to main Module")
- page_2()
- except ValueError:
- print("Please Try again")
- module_9()()
- page_2()
- def module_10():
- print("NOT YET WORKING")
- page_3()
- def module_11(): # Finished and Working :)
- import random
- import time
- my_dict = {
- "Base-2 number system" : "binary",
- "Number system that uses the characters 0-F" : "hexidecimal",
- "7-bit text encoding standard" : "ascii",
- "16-bit text encoding standard" : "unicode",
- "A number that is bigger than the maximum number that can be stored" : "overflow",
- "8 bits" : "byte",
- "1024 bytes" : "kilobyte",
- 'What does "RAM" stand for' : "random access memory",
- 'What does "ROM" stand for' : "Read-only Memory",
- 'What does "GPU" stand for' : "Graphics Processing Unit",
- 'What does "CPU" stand for' : "Central Processing Unit",
- "What is the main component of a computer that strings everything together" : "The Motherboard",
- "Picture Element. The smallest component of a bitmapped image" : "pixel",
- "How Heavy was the first computer" : "27 Tons",
- "How much of the world's currency is digital currency (%)" : "90%",
- "A binary representation of a program" : "machine code",
- "How much of the worlds currency is physical money (%)" : "10%",
- "What is the longest word that you can write only using one row your keyboard" : "typewriter",
- "What is the average amount of new viruses created each month" : "5000",
- "If there was a computer as powerfull as the human brain, how many operations could it do per second (hint: in Quintillions)" : "0.38 Quintillion",
- "If there was a computer as powerfull as the human brain, how much memory could it store (hint: in Terabytes)" : "3850TB",
- "An intersting thing that HP, Microsoft and Apple have in common" : "They were all started in a garage",
- "How much of daily emails sent is spam (%)" : "80%",
- "The original name of windows" : "Interface Manager",
- "When was the first ever hard disk drive made" : "1979",
- "How much could the first hard disk drive store" : "5mb",
- "The average person normally blinks 20 times a minute, but when using a computer how much per minute? (hint: less)" : "7 times per minute",
- "A in ASCII" : "65",
- "a in ASCII" : "97",
- "What do you call a structured set of data, held in a computer" : "A database",
- "What are formatting symbols" : "Invisible characters used to mark spaces, paragraphs and page breaks",
- "How is information/data stored in a computer" : "binary",
- "How is \"Phone\" represented in ASCII" : "080 104 111 110 101",
- "Covert the ASCII word: \"115 117 109 109 101 114\" " : "summer",
- "What does Moore's Law state:" : "That the number of processes a computer can perform approximately doubles every two years",
- """If a computer has these specifications:
- Intel Core i7-6800K 6 Core 3.4 GHz
- 15 MB CPU cache
- 32 GB DDR4 2800MHz
- NVIDIA GTX1080 8GB GDDR5
- 2TB SATA3 HDD
- 500GB SATA3 SSD
- What is its total data storage? (hint: Terabytes)""" : "2.5TB",
- """If a computer has these specifications:
- Intel Core i7-6800K 6 Core 3.4 GHz
- 15 MB CPU cache
- 32 GB DDR4 2800MHz
- NVIDIA GTX1080 8GB GDDR5
- 2TB SATA3 HDD
- 500GB SATA3 SSD
- What is its GPU and its specs""" : "NVIDIA GTX1080 8GB GDDR5",
- """If a computer has these specifications:
- Intel Core i7-6800K 6 Core 3.4 GHz
- 15 MB CPU cache
- 32 GB DDR4 2800MHz NVIDIA
- GTX1080 8GB GDDR5
- 2TB SATA3 HDD
- 500GB SATA3 SSD
- What is its CPU and its specs?""" : "Intel Core i7-6800K 6 core 3.4 GHz",
- "How many different values can we represent with a byte" : "256",
- "If we want to represent 30 different values, how many bits do we need" : "5",
- "What is the decimal equivalent of 00101111" : "47",
- "What is the decimal equivalent of 10000000" : "128",
- "What is the biggest decimal number 8 bits can represent" : "256",
- "What is the binary equivalent of 123" : "01111011",
- "What has more memory capacity a TB or GB" : "TB",
- "What kind of software gives you free access to the program but no source code" : "Freeware",
- "What kind of software gives you free access to the program and access to its source code" : "Open Source",
- "What does GUI stand for" : "Graphical user interface",
- "What does CLI stand for" : "Command-line interface",
- "What network model does the internet use" : "Packet-switched networking",
- "What protocol should I choose on my email client if I want to access my emails using multiple devices?" : "IMAP",
- "What is the difference between synchronous an asynchronous communications" : "Synchronous communications deliver the message instantly meanwhile Asynchronous delays the message, therefore the reciever gets the message after some time",
- "What is the domain name in this email address 'Ineedcomputerhelp@computerhelp.co.nz'" : "computerhelp.co.nz",
- "What is the key difference between blogs and micro-blogs" : "Micro-blogs are designed for sharing smaller peices of content",
- "What is a Firewall" : "A system/protocol that prevents unauthorised access to a network",
- "What is a Proxy" : "A system/protocol that intercepts and processes requests from clients and servers",
- "What is a Client" : "A piece of hardware or software that accesses a service made avaliable by a server",
- "What is a Server" : "A computer program or device that provides functionality for other programs or devices, otherwise known as clients",
- "What is a text editor" : "is a piece of software used for editing plain text",
- "What is a word processor" : "a program or machine used for storing, manipulating and formatting text entered from a keyboard",
- "What is the main difference between a word processor and a text editor" : "A text editor is used for editing plain text. A word processor can edit text as well as add formatting to the text",
- "What is the word 'Program' in ASCII" : "080 114 111 103 114 097 109",
- "How do you represent 'I Need Help' in ASCII note: a 'space' is represented as 032" : "073 032 078 101 101 100 032 072 101 108 112",
- "How do you represent '123456789' in ASCII" : "049 050 051 052 053 054 055 056 057"
- }
- title = "| Computing Revision Quiz |"
- extras = len(title)
- banner = "=" * extras
- print("\n",banner,"\n",title," \n",banner, "\n", sep = '')
- print("Just a heads up, all answers are super specific\n",
- "However is not case sensitive\n",
- "Hope the quiz helps :)", sep = '')
- try:
- playing = True
- while playing == True:
- try:
- score = 0
- num = int(input("\nHow many questions would you like: "))
- for i in range(num):
- question = (random.choice( list(my_dict.keys())))
- answer = my_dict[question]
- print("\nQuestion " + str(i+1) )
- print(question + "?")
- guess = input("> ")
- if guess.lower() == answer.lower():
- print("Correct!")
- score += 1
- elif guess.lower() == "r":
- print("=" * 40, "\nRestarting Quiz.....", sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- module_11()()
- elif guess.lower() == "quit":
- print("=" * 40, "\nReturning back to main Module.....", sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_3()
- elif guess.lower() == "q":
- print("=" * 40, "\nReturning back to main Module.....", sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_3()
- else:
- print("Nope!\n",
- "Answer: ", answer, sep = '')
- print("\nYou got " + str(score), "/", num, " correct", sep = '')
- if score == num:
- print("Perfect Score\n", '=' * 40, sep = '')
- again = input("Enter any key to play again?, or 'q' to quit: ")
- try:
- if again.lower() == 'q':
- print("=" * 40, "\nReturning back to Main Module.....\n",
- "=" * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- playing = False
- page_3()
- except ValueError:
- page_3()
- except ValueError:
- print("Invalid Input\nReturning back to main Module.....\n", "=" * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_3()
- except ValueError:
- print("Invalid Input")
- try:
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_11()()
- else:
- print("=" * 40, "\nReturning back to Main Module.....\n",
- "=" * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_3()
- except ValueError:
- page_3()
- page_3()
- def module_12(): # Finished and Working :)
- import random
- import time
- my_dict = {
- """Base-2 number system:
- a) Binary
- b) Hexidecimal
- c) ASCII
- d) unicode""" : "A",
- """Number system that uses the characters 0-F:
- a) Binary
- b) Hexidecimal
- c) ASCII
- d) unicode""" : "B",
- """7-bit text encoding standard:
- a) Binary
- b) Hexidecimal
- c) ASCII
- d) unicode""" : "C",
- """16-bit text encoding standard:
- a) Binary
- b) Hexidecimal
- c) ASCII
- d) unicode""" : "D",
- """A number that is bigger than the maximum number that can be stored:
- a) Over-capacity
- b) Overflow
- c) Surplus
- d) Overabundance""" : "B",
- """8 bits:
- a) Bit
- b) Byte
- c) Byt
- d) Unit""" : "B",
- """1024 bytes:
- a) Megabyte
- b) Megabit
- c) Kilobyte
- d) Mebibit""" : "C",
- """What does "RAM" stand for:
- a) Remote Access Memory
- b) Read All Memory
- c) Random Access Memory
- d) Really Anoying Mother""" : "C",
- """What does "ROM" stand for:
- a) Read-only Memory
- b) Record of Merit
- c) Range of Memory
- d) Roll-over Memory""" : "A",
- """What does "GPU" stand for:
- a) General Processing Unit
- b) Graphics Processing Unit
- c) General Power Unit
- d) General Propietary Unifier""" : "B",
- """What does "CPU" stand for:
- a) Computer Pick Up
- b) Central Processing Unit
- c) Commanding Process Unit
- d) Corporate Processing Unit""" : "B",
- "What is the main component of a computer that strings everything together" : "The Motherboard",
- "Picture Element. The smallest component of a bitmapped image" : "pixel",
- "How Heavy was the first computer" : "27 Tons",
- "How much of the world's currency is digital currency (%)" : "90%",
- "A binary representation of a program" : "machine code",
- "How much of the worlds currency is physical money (%)" : "10%",
- "What is the longest word that you can write only using one row your keyboard" : "typewriter",
- """What is the average amount of new viruses created each month:
- a) 10000
- b) 1200
- c) 5000
- d) 8000""" : "C",
- """If there was a computer as powerfull as the human brain, how many operations could it do per second:
- a) 0.38 Quintillion
- b) 4 Million
- c) 12 Billion
- d) 5 Octillion""" : "A",
- """If there was a computer as powerfull as the human brain, how much memory could it store:
- a) 5GB
- b) 10TB
- c) 3850TB
- d) 40000GB""" : "C",
- """An intersting thing that HP, Microsoft and Apple have in common:
- a) They all are technological companys
- b) They were all started in a garage
- c) They all sell very cheap products
- d) They are all partners
- e) They all wish to control the digital world
- f) They're founders all had the same vision""" : "B",
- "How much of daily emails sent is spam (%)" : "80%",
- """What is was original name of windows:
- a) Digital worlds
- b) Interface Manager
- c) Computing Manager
- d) Operating Systems""" : "B",
- """When was the first ever hard disk drive made:
- a) 1979
- b) 1845
- c) 1967
- d) 2001""" : "A",
- """How much could the first hard disk drive store:
- a) 5mb
- b) 10mb
- c) 10kb
- d) 40mb""" : "A",
- """The average person normally blinks 20 times a minute, but when using a computer how much per minute?
- a) 7
- b) 8
- c) 12
- d) 2""" : "A",
- "A in ASCII" : "65",
- "a in ASCII" : "97",
- "What do you call a structured set of data, held in a computer" : "A database",
- """What are formatting symbols:
- a) Any Input made by a keyboard input
- b) Invisible characters used to mark spaces, paragraphs and page breaks
- c) A hand gesture you use to identify boring people
- d) Any other character other than the alphabet""" : "B",
- "How is information/data stored in a computer" : "in binary",
- "How is \"Phone\" represented in ASCII" : "080 104 111 110 101",
- "Covert the ASCII word: \"115 117 109 109 101 114\" " : "summer",
- """What does Moore's Law state:
- a) Boring old Hags shouldn't use computers
- b) Anyone can use technology, except for "blondes"
- c) That a computers processing power apporximately doubles every two years
- d) That a computer capability to process things far exceeds that of a human""" : "C",
- """If a computer has these specifications:
- Intel Core i7-6800K 6 Core 3.4 GHz
- 15 MB CPU cache
- 32 GB DDR4 2800MHz
- NVIDIA GTX1080 8GB GDDR5
- 2TB SATA3 HDD
- 500GB SATA3 SSD
- What is its total data storage? (hint: Terabytes)""" : "2.5TB",
- """If a computer has these specifications:
- Intel Core i7-6800K 6 Core 3.4 GHz
- 15 MB CPU cache
- 32 GB DDR4 2800MHz
- NVIDIA GTX1080 8GB GDDR5
- 2TB SATA3 HDD
- 500GB SATA3 SSD
- What is its GPU and its specs
- a) NVIDIA GTX 1080 8GB GDDR5
- b) AMD R900 4GB
- c) NVIDIA TITAN X 8GB GDDR5
- d) NVIDIA GTX 1070 8GB GDDR5""" : "A",
- """If a computer has these specifications:
- Intel Core i7-6800K 6 Core 3.4 GHz
- 15 MB CPU cache
- 32 GB DDR4 2800MHz NVIDIA
- GTX1080 8GB GDDR5
- 2TB SATA3 HDD
- 500GB SATA3 SSD
- What is its CPU and its specs?
- a) Intel Core i7-6800K 6 core 3.4 GHz
- b) Sata 3 HDD
- c) AMD Ryzen 7
- d) Intel AMD Core 9 i9-5500k 8.9 GHz""" : "A",
- """How many different values can we represent with a byte:
- a) 128
- b) 32
- c) 40
- d) 256""" : "D",
- """If we want to represent 30 different values, how many bits do we need:
- a) 7
- b) 12
- c) 8
- d) 5""" : "D",
- """What is the decimal equivalent of 00101111:
- a) 20
- b) 40
- c) 47
- d) 80""" : "C",
- "What is the decimal equivalent of 10000000" : "128",
- "What is the biggest decimal number 8 bits can represent" : "256",
- "What is the binary equivalent of 123" : "01111011",
- "What has more memory capacity a TB or GB" : "TB",
- "What kind of software gives you free access to the program but no source code" : "Freeware",
- "What kind of software gives you free access to the program and access to its source code" : "Open Source",
- "What does GUI stand for" : "Graphical user interface",
- "What does CLI stand for" : "Command-line interface",
- "What network model does the internet use" : "Packet-switch networking",
- "What protocol should I choose on my email client if I want to access my emails using multiple devices?" : "IMAP",
- """What is the difference between synchronous an asynchronous communications:
- a) Synchronous communications deliver the message instantly meanwhile Asynchronous delays the message,
- therefore the reciever gets the message after some time
- b) Synchronous communications are synced with your local time, while Asynchronous isn't
- c) Synchronous communications are "peer to peer", while Asynchronous is for multiple connections
- d) Synchronous communincations physical communications i.e actual real life conversations,
- while Asynchronous are online conversations""" : "A",
- "What is the domain name in this email address 'Ineedcomputerhelp@computerhelp.co.nz'" : "computerhelp.co.nz",
- """What is the key difference between blogs and micro-blogs:
- a) Nothing
- b) Micro-blogs are designed for sharing smaller peices of content
- c) Micro-blogs are made up of physical content i.e not digital
- d) Micro-blogs only take about smaller "not so important" subjects""" : "B",
- """What is a Firewall:
- a) A wall that is on fire
- b) A system/protocol that prevents unauthorised access to a network
- c) A system/protocol made to stop you from watching porn
- d) A system/protocol that allows you to access unauthorised areas of a network""" : "B",
- """What is a Proxy:
- a) A system/protocol that allows you to access unauthorise areas of a network
- b) a system/protocol that allows you to watch porn
- c) A system/protocol that intercepts and processes requests from clients and servers
- d) Nothing really, is just a made up word""" : "C",
- """What is a Client:
- a) A piece of hardware or software that accesses a service made avaliable by a server
- b) Are people businesses deal with
- c) Are people using this program
- d) A piece of software that helps people find work""" : "A",
- """What is a Server:
- a) Something/Someone that provides a service
- b) A computer that displays life-like behaviours that help you through hardship or complex problems
- c) A computer program or device that provides functionality for other programs or devices, otherwise known as clients
- d) A program you run on your computer that allows you to access the world wide web""" : "C",
- """What is a text editor:
- a) Programs such as Microsoft Word, that allow you to edit and format text
- b) Any old programming software
- c) A program that converts your handwritten text so that it can be view on your computer, making your handwriting nicer and neater
- d) Is a piece of software used for editing plain text""" : "D",
- """What is a word processor
- a) A program made for programming
- b) A program or machine used for storing, manipulating and formatting text entered from a keyboard
- c) A function in Microsoft Word
- d) A person who takes your written document and edits it so that its better""" : "B",
- """What is the main difference between a word processor and a text editor
- a) A text editor can only be used to create programs,
- while a word processor can only format and create text documents
- b) A text editor can only edit text contained within a range that is the only the alphabet,
- while a word procesor can edit an kind of text
- c) A text editor is used for editing plain text,
- while a word processor can edit text as well as add formatting to the text
- d) Nothing""" : "C",
- "What is the word 'Program' in ASCII" : "080 114 111 103 114 097 109",
- "How do you represent 'I Need Help' in ASCII note: a 'space' is represented as 032" : "073 032 078 101 101 100 032 072 101 108 112",
- "How do you represent '123456789' in ASCII" : "049 050 051 052 053 054 055 056 057",
- """What kind of coding standard is Machine Code:
- a) Hexidecimal
- b) Unicode
- c) ASCII
- d) Binary
- e) Bynary""" : "D"
- }
- title = "| Computing Revision Quiz Version 2 |"
- extras = len(title)
- banner = "=" * extras
- print("\n",banner,"\n",title," \n",banner, "\n", sep = '')
- print("Just a heads up, all answers are super specific\n",
- "However is not case sensitive\n",
- "Some are Multi Choice\n",
- "Hope the quiz helps :)", sep = '')
- try:
- playing = True
- while playing == True:
- try:
- score = 0
- num = int(input("\nHow many questions would you like: "))
- for i in range(num):
- question = (random.choice( list(my_dict.keys())))
- answer = my_dict[question]
- print("\nQuestion " + str(i+1) )
- print(question + "?")
- guess = input("> ")
- if guess.lower() == answer.lower():
- print("Correct!")
- score += 1
- elif guess.lower() == "r":
- print("=" * 40, "\nRestarting Quiz.....", sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- module_12()()
- elif guess.lower() == "quit":
- print("=" * 40, "\nReturning back to main Module.....", sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_3()
- elif guess.lower() == "q":
- print("=" * 40, "\nReturning back to main Module.....", sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_3()
- else:
- print("Nope!\n",
- "Answer: ", answer, sep = '')
- print("\nYou got " + str(score), "/", num, " correct", sep = '')
- if score == num:
- print("Perfect Score\n", '=' * 40, sep = '')
- again = input("Enter any key to play again?, or 'q' to quit: ")
- try:
- if again.lower() == 'q':
- print("=" * 40, "\nReturning back to Main Module.....\n",
- "=" * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- playing = False
- page_3()
- except ValueError:
- page_3()
- except ValueError:
- print("Invalid Input\nReturning back to main Module.....\n", "=" * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_3()
- except ValueError:
- print("Invalid Input")
- try:
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_12()()
- else:
- print("=" * 40, "\nReturning back to Main Module.....\n",
- "=" * 40, sep = '')
- print("5.....")
- time.sleep(1)
- print("4....")
- time.sleep(1)
- print("3...")
- time.sleep(1)
- print("2..")
- time.sleep(1)
- print("1.")
- time.sleep(1)
- print("=" * 40)
- page_3()
- except ValueError:
- page_3()
- page_3()
- def module_13(): # Finished and Working :)
- try:
- print("Description Generator V2.0")
- question_2 = str(input("What would you like to describe: "))
- question_3 = str(input("Enter Description: "))
- print("\n",question_2," ",question_3, sep = '')
- try:
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_13()()
- else:
- print("============================================")
- page_3()
- except ValueError:
- try:
- print("Invalid Input")
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_13()()
- else:
- print("============================================")
- page_3()
- except ValueError:
- page_3()
- except ValueError:
- page_3()
- def module_14():
- import random
- try:
- number_of_randomness = int(input("How many numbers would you like to generate: "))
- print("=========================================================")
- k = True
- i = 0
- while k == True:
- a = random.randrange(0, number_of_randomness)
- print(a)
- i = i + 1
- if i == number_of_randomness:
- k = False
- try:
- print("=========================================================")
- question = input("Would you like to generate more random numbers? ")
- question = question.lower()
- if question == "yes":
- module_14()()
- else:
- print("=========================================================")
- page_3()
- except ValueError:
- try:
- print("Invalid Input")
- question = input("Would you like to try again? ")
- question = question.lower()
- print("=========================================================")
- if question == "yes":
- module_14()()
- else:
- print("=========================================================")
- page_3()
- except ValueError:
- page_3()
- except ValueError:
- try:
- print("Invalid Input")
- question = input("Would you like to try again? ")
- question = question.lower()
- if question == "yes":
- module_14()()
- else:
- print("=========================================================")
- page_3()
- except ValueError:
- page_3()
- page_3()
- def module_15():
- print("NOT YET WORKING")
- page_3()
- def module_16():
- print("NOT YET WORKING")
- page_4()
- def module_17():
- print("NOT YET WORKING")
- page_4()
- def module_18():
- print("NOT YET WORKING")
- page_4()
- def module_19():
- print("NOT YET WORKING")
- page_4()
- def module_20():
- print("NOT YET WORKING")
- page_4()
- def module_21():
- print("NOT YET WORKING")
- page_5()
- def module_22():
- print("NOT YET WORKING")
- page_5()
- def module_23():
- print("NOT YET WORKING")
- page_5()
- def module_24():
- print("NOT YET WORKING")
- page_5()
- def module_25():
- print("NOT YET WORKING")
- page_5()
- def help():
- print("""
- ===========================================
- Each number corresponds with a module
- Please select/enter a number to access
- a module
- type "quit" to exit a module or quit
- the main program
- Any other invalid input will also prompt
- you to quit the program
- ===========================================""")
- page_index()
- page_index()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement