Advertisement
The_TrueBlue

Modular_Program_V2

Mar 22nd, 2018
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 70.99 KB | None | 0 0
  1. """
  2. Enzo Villarama
  3. =============================================
  4. This Is a Modular Programme
  5. =============================================
  6. """
  7. import time  
  8.  
  9. def page_1():              
  10.     print("\nEnzo Villarama\nThis Is a Modular Program   <Page 1>")            
  11.     Options = print("""============================================
  12. 1. Cypher / Decypher
  13. 2.
  14. 3. Rock / Paper / Scissors
  15. 4. Tax Calculation
  16. 5. Calculator
  17. 6. Page Select
  18. ============================================
  19. Help <H>
  20. """)
  21.     Ask = input("Enter Choice: ").strip()
  22.     print("========================================")
  23.    
  24.     if Ask == "1":
  25.         module_1()
  26.        
  27.     elif Ask == "2":
  28.         module_2()
  29.        
  30.     elif Ask == "3":
  31.         module_3()()
  32.        
  33.     elif Ask == "4":
  34.         module_4()()
  35.        
  36.     elif Ask == "5":
  37.         module_5()()
  38.        
  39.     elif Ask == "6":
  40.         page_index()
  41.  
  42.     elif Ask == "h":
  43.         help()
  44.  
  45.     elif Ask == "quit":
  46.         print('Quiting Program\n',
  47.               '=' * 40, sep = '')
  48.  
  49.         print("5.....")
  50.         time.sleep(1)
  51.  
  52.         print("4....")
  53.         time.sleep(1)
  54.  
  55.         print("3...")
  56.         time.sleep(1)
  57.  
  58.         print("2..")
  59.         time.sleep(1)
  60.  
  61.         print("1.")
  62.         time.sleep(1)
  63.         print("=" * 40)
  64.              
  65.         quit()
  66.        
  67.     else:
  68.         try:
  69.             print("Invalid Input")
  70.  
  71.             try:
  72.                 question = input("Do you want to quit the program? ")
  73.                 question = question.lower()
  74.  
  75.                 if question == "yes":
  76.                     print("Quiting Program\n",
  77.                           '=' * 40, sep = '')
  78.  
  79.                     print("5.....")
  80.                     time.sleep(1)
  81.  
  82.                     print("4....")
  83.                     time.sleep(1)
  84.  
  85.                     print("3...")
  86.                     time.sleep(1)
  87.  
  88.                     print("2..")
  89.                     time.sleep(1)
  90.  
  91.                     print("1.")
  92.                     time.sleep(1)
  93.                     print("=" * 40)
  94.                          
  95.                     quit()
  96.                    
  97.                 elif question == "quit":
  98.                     print('Quiting Program\n',
  99.                           '=' * 40, sep = '')
  100.  
  101.                     print("5.....")
  102.                     time.sleep(1)
  103.  
  104.                     print("4....")
  105.                     time.sleep(1)
  106.  
  107.                     print("3...")
  108.                     time.sleep(1)
  109.  
  110.                     print("2..")
  111.                     time.sleep(1)
  112.  
  113.                     print("1.")
  114.                     time.sleep(1)
  115.                     print("=" * 40)
  116.                          
  117.                     quit()
  118.                    
  119.                 else:
  120.                     print("========================================")
  121.                     page_1()
  122.                    
  123.             except ValueError:
  124.                 page_1()
  125.  
  126.         except ValueError:
  127.             page_1()
  128.  
  129.  
  130.  
  131. def page_2():       # ADD MORE MODULES :)
  132.     print("\nEnzo Villarama\nThis Is a Modular Program   <Page 2>")
  133.     options = print("""============================================
  134. 1. Random Binary Number Generator
  135. 2. Evolution of Text
  136. 3. Evolution of Text Re-work
  137. 4. O's & 1's
  138. 5.
  139. 6. Page Select
  140. ============================================
  141. Help <H>
  142. """)
  143.     Ask = input("Enter Choice: ").strip()
  144.     print("========================================")
  145.    
  146.     if Ask == "1":
  147.         module_6()()
  148.  
  149.     elif Ask == "2":
  150.         module_7()()
  151.  
  152.     elif Ask == "3":
  153.         module_8()()    
  154.    
  155.     elif Ask == "4":
  156.         module_9()()
  157.  
  158.     elif Ask == "5":
  159.         module_10()()
  160.  
  161.     elif Ask == "6":
  162.         page_index()
  163.  
  164.     elif Ask == "h":
  165.         help()
  166.        
  167.     elif Ask == "quit":
  168.         print('Quiting Program\n',
  169.               '=' * 40, sep = '')
  170.  
  171.         print("5.....")
  172.         time.sleep(1)
  173.  
  174.         print("4....")
  175.         time.sleep(1)
  176.  
  177.         print("3...")
  178.         time.sleep(1)
  179.  
  180.         print("2..")
  181.         time.sleep(1)
  182.  
  183.         print("1.")
  184.         time.sleep(1)
  185.         print("=" * 40)
  186.              
  187.         quit()
  188.  
  189.     else:
  190.         try:
  191.             print("Invalid Input")
  192.  
  193.             try:
  194.                 question = input("Do you want to quit the program? ")
  195.                 question = question.lower()
  196.  
  197.                 if question == "yes":
  198.                     print('Quiting Program\n',
  199.                           '=' * 40, sep = '')
  200.  
  201.                     print("5.....")
  202.                     time.sleep(1)
  203.  
  204.                     print("4....")
  205.                     time.sleep(1)
  206.  
  207.                     print("3...")
  208.                     time.sleep(1)
  209.  
  210.                     print("2..")
  211.                     time.sleep(1)
  212.  
  213.                     print("1.")
  214.                     time.sleep(1)
  215.                     print("=" * 40)
  216.                          
  217.                     quit()
  218.  
  219.                 elif question == "quit":
  220.                     print('Quiting Program\n',
  221.                           '=' * 40, sep = '')
  222.  
  223.                     print("5.....")
  224.                     time.sleep(1)
  225.  
  226.                     print("4....")
  227.                     time.sleep(1)
  228.  
  229.                     print("3...")
  230.                     time.sleep(1)
  231.  
  232.                     print("2..")
  233.                     time.sleep(1)
  234.  
  235.                     print("1.")
  236.                     time.sleep(1)
  237.                     print("=" * 40)
  238.                          
  239.                     quit()
  240.                    
  241.                 else:
  242.                     print("========================================")
  243.                     page_2()
  244.                    
  245.             except ValueError:
  246.                 page_2()
  247.  
  248.         except ValueError:
  249.             page_2()
  250.  
  251.  
  252.  
  253. def page_3():           # ADD MORE MODULES :)
  254.     print("\nEnzo Villarama\nThis Is a Modular Program   <Page 3>")        
  255.     options = print("""============================================
  256. 1. Computing Revision Quiz V1
  257. 2. Computing Revision Quiz V2 (TBF)
  258. 3. Description Generator
  259. 4. Randomness
  260. 5.
  261. 6. Page Select
  262. ============================================
  263. Help <H>
  264. """)
  265.     Ask = input("Enter Choice: ").strip()
  266.     print("========================================")
  267.    
  268.     if Ask == "1":
  269.         module_11()()
  270.  
  271.     elif Ask == "2":
  272.         module_12()()
  273.  
  274.     elif Ask == "3":
  275.         module_13()()    
  276.    
  277.     elif Ask == "4":
  278.         module_14()()
  279.  
  280.     elif Ask == "5":
  281.         module_15()()
  282.  
  283.     elif Ask == "6":
  284.         page_index()
  285.  
  286.     elif Ask == "h":
  287.         help()
  288.  
  289.     elif Ask == "quit":
  290.         print('Quiting Program\n',
  291.                 '=' * 40, sep = '')
  292.  
  293.         print("5.....")  
  294.         time.sleep(1)
  295.  
  296.         print("4....")
  297.         time.sleep(1)
  298.  
  299.         print("3...")
  300.         time.sleep(1)
  301.  
  302.         print("2..")
  303.         time.sleep(1)
  304.  
  305.         print("1.")
  306.         time.sleep(1)
  307.         print("=" * 40)
  308.              
  309.         quit()
  310.        
  311.     else:
  312.         try:
  313.             print("Invalid Input")
  314.  
  315.             try:
  316.                 question = input("Do you want to quit the program? ")
  317.                 question = question.lower()
  318.  
  319.                 if question == "yes":
  320.                     print('Quiting Program\n',
  321.                           '=' * 40, sep = '')
  322.  
  323.                     print("5.....")
  324.                     time.sleep(1)
  325.  
  326.                     print("4....")
  327.                     time.sleep(1)
  328.  
  329.                     print("3...")
  330.                     time.sleep(1)
  331.  
  332.                     print("2..")
  333.                     time.sleep(1)
  334.  
  335.                     print("1.")
  336.                     time.sleep(1)
  337.                     print("=" * 40)
  338.                          
  339.                     quit()
  340.  
  341.                 elif question == "quit":
  342.                     print('Quiting Program\n',
  343.                           '=' * 40, sep = '')
  344.  
  345.                     print("5.....")
  346.                     time.sleep(1)
  347.  
  348.                     print("4....")
  349.                     time.sleep(1)
  350.  
  351.                     print("3...")
  352.                     time.sleep(1)
  353.  
  354.                     print("2..")
  355.                     time.sleep(1)
  356.  
  357.                     print("1.")
  358.                     time.sleep(1)
  359.                     print("=" * 40)
  360.                          
  361.                     quit()
  362.  
  363.                 else:
  364.                     print("========================================")
  365.                     page_3()
  366.                    
  367.             except ValueError:
  368.                 page_3()
  369.  
  370.         except ValueError:
  371.             page_3()
  372.  
  373.  
  374.    
  375.  
  376.  
  377. def page_4():           # ADD MORE MODULES :)
  378.     print("\nEnzo Villarama\nThis Is a Modular Program   <Page 4>")        
  379.     options = print("""============================================
  380. 1.
  381. 2.
  382. 3.
  383. 4.
  384. 5.
  385. 6. Page Select
  386. ============================================
  387. Help <H>
  388. """)
  389.     Ask = input("Enter Choice: ").strip()
  390.     print("========================================")
  391.    
  392.     if Ask == "1":
  393.         module_16()()
  394.  
  395.     elif Ask == "2":
  396.         module_17()()
  397.  
  398.     elif Ask == "3":
  399.         module_18()()    
  400.    
  401.     elif Ask == "4":
  402.         module_19()()
  403.  
  404.     elif Ask == "5":
  405.         module_20()()
  406.  
  407.     elif Ask == "6":
  408.         page_index()
  409.  
  410.     elif Ask == "h":
  411.         help()
  412.  
  413.     elif Ask == "quit":
  414.         print('Quiting Program\n',
  415.                 '=' * 40, sep = '')
  416.  
  417.         print("5.....")
  418.         time.sleep(1)
  419.  
  420.         print("4...")
  421.         time.sleep(1)
  422.  
  423.         print("3..")
  424.         time.sleep(1)
  425.  
  426.         print("2..")
  427.         time.sleep(1)
  428.  
  429.         print("1.")
  430.         time.sleep(1)
  431.         print("=" * 40)
  432.              
  433.         quit()
  434.        
  435.     else:
  436.         try:
  437.             print("Invalid Input")
  438.  
  439.             try:
  440.                 question = input("Do you want to quit the program? ")
  441.                 question = question.lower()
  442.  
  443.                 if question == "yes":
  444.                     print('Quiting Program\n',
  445.                             '=' * 40, sep = '')
  446.  
  447.                     print("5.....")
  448.                     time.sleep(1)
  449.  
  450.                     print("4....")
  451.                     time.sleep(1)
  452.  
  453.                     print("3...")
  454.                     time.sleep(1)
  455.  
  456.                     print("2..")
  457.                     time.sleep(1)
  458.  
  459.                     print("1.")
  460.                     time.sleep(1)
  461.                     print("=" * 40)
  462.                          
  463.                     quit()
  464.                    
  465.                 elif question == "quit":
  466.                     print('Quiting Program\n',
  467.                             '=' * 40, sep = '')
  468.  
  469.                     print("5.....")
  470.                     time.sleep(1)
  471.  
  472.                     print("4....")
  473.                     time.sleep(1)
  474.  
  475.                     print("3...")
  476.                     time.sleep(1)
  477.  
  478.                     print("2..")
  479.                     time.sleep(1)
  480.  
  481.                     print("1.")
  482.                     time.sleep(1)
  483.                     print("=" * 40)
  484.                          
  485.                     quit()
  486.  
  487.                 else:
  488.                     print("========================================")
  489.                     page_4()
  490.                    
  491.             except ValueError:
  492.                 page_4()
  493.  
  494.         except ValueError:
  495.             page_4()
  496.  
  497.  
  498. def page_5():           # ADD MORE MODULES :)
  499.     print("\nEnzo Villarama\nThis Is a Modular Program   <Page 4>")        
  500.     options = print("""============================================
  501. 1.
  502. 2.
  503. 3.
  504. 4.
  505. 5.
  506. 6. Page Select
  507. ============================================
  508. Help <H>
  509. """)
  510.     Ask = input("Enter Choice: ").strip()
  511.     print("========================================")
  512.    
  513.     if Ask == "1":
  514.         module_21()()
  515.  
  516.     elif Ask == "2":
  517.         module_22()
  518.  
  519.     elif Ask == "3":
  520.         module_23()    
  521.    
  522.     elif Ask == "4":
  523.         module_24()
  524.  
  525.     elif Ask == "5":
  526.         module_25()
  527.  
  528.     elif Ask == "6":
  529.         page_index()
  530.  
  531.     elif Ask == "h":
  532.         help()
  533.  
  534.     elif Ask == "quit":
  535.         print('Quiting Program\n',
  536.                 '=' * 40, sep = '')
  537.  
  538.         print("5.....")
  539.         time.sleep(1)
  540.  
  541.         print("4....")
  542.         time.sleep(1)
  543.  
  544.         print("3...")
  545.         time.sleep(1)
  546.  
  547.         print("2..")
  548.         time.sleep(1)
  549.  
  550.         print("1.")
  551.         time.sleep(1)
  552.         print("=" * 40)
  553.              
  554.         quit()
  555.  
  556.     else:
  557.         try:
  558.             print("Invalid Input")
  559.  
  560.             try:
  561.                 question = input("Do you want to quit the program? ")
  562.                 question = question.lower()
  563.  
  564.                 if question == "yes":
  565.                     print('Quiting Program\n',
  566.                             '=' * 40, sep = '')
  567.  
  568.                     print("5.....")
  569.                     time.sleep(1)
  570.  
  571.                     print("4....")
  572.                     time.sleep(1)
  573.  
  574.                     print("3...")
  575.                     time.sleep(1)
  576.  
  577.                     print("2..")
  578.                     time.sleep(1)
  579.  
  580.                     print("1..")
  581.                     time.sleep(1)
  582.                     print("=" * 40)
  583.                          
  584.                     quit()
  585.  
  586.                 elif question == "quit":
  587.                     print('Quiting Program\n',
  588.                             '=' * 40, sep = '')
  589.  
  590.                     print("5.....")
  591.                     time.sleep(1)
  592.  
  593.                     print("4....")
  594.                     time.sleep(1)
  595.  
  596.                     print("3...")
  597.                     time.sleep(1)
  598.  
  599.                     print("2..")
  600.                     time.sleep(1)
  601.  
  602.                     print("1.")
  603.                     time.sleep(1)
  604.                     print("=" * 40)
  605.                          
  606.                     quit()
  607.  
  608.                 else:
  609.                     print("========================================")
  610.                     page_5()
  611.                    
  612.             except ValueError:
  613.                 page_5()
  614.  
  615.         except ValueError:
  616.             page_5()
  617.  
  618.  
  619.  
  620. def page_index():       # Add more Pages
  621.     print("\nEnzo Villarama\nThis Is a Modular Program   <Page Select>")
  622.     options = print("""============================================
  623. 1. Page 1 -->
  624. 2. Page 2 -->
  625. 3. Page 3 -->
  626. 4. Page 4 -->
  627. 5. Page 5 -->
  628. ============================================
  629. Help <H>
  630. """)
  631.    
  632.     Ask = input("Enter Choice: ").strip()
  633.     print("========================================")
  634.    
  635.     if Ask == "1":
  636.         page_1()
  637.  
  638.     elif Ask == "2":
  639.         page_2()
  640.  
  641.     elif Ask == "3":
  642.         page_3()
  643.  
  644.     elif Ask == "4":
  645.         page_4()
  646.  
  647.     elif Ask == "5":
  648.         page_5()      
  649.  
  650.     elif Ask == "h":
  651.         help()
  652.        
  653.     elif Ask == "quit":
  654.         print('Quiting Program\n',
  655.                 '=' * 40, sep = '')
  656.  
  657.         print("5.....")
  658.         time.sleep(1)
  659.  
  660.         print("4....")
  661.         time.sleep(1)
  662.  
  663.         print("3...")
  664.         time.sleep(1)
  665.  
  666.         print("2..")
  667.         time.sleep(1)
  668.  
  669.         print("1.")
  670.         time.sleep(1)
  671.         print("=" * 40)
  672.              
  673.         quit()
  674.        
  675.     else:
  676.         try:
  677.             print("Invalid Input")
  678.  
  679.             try:
  680.                 question = input("Do you want to quit the program? ")
  681.                 question = question.lower()
  682.  
  683.                 if question == "yes":
  684.                     print('Quiting Program\n',
  685.                             '=' * 40, sep = '')
  686.  
  687.                     print("5.....")
  688.                     time.sleep(1)
  689.  
  690.                     print("4....")
  691.                     time.sleep(1)
  692.  
  693.                     print("3...")
  694.                     time.sleep(1)
  695.  
  696.                     print("2..")
  697.                     time.sleep(1)
  698.  
  699.                     print("1.")
  700.                     time.sleep(1)
  701.                     print("=" * 40)
  702.                          
  703.                     quit()
  704.  
  705.                 elif question == "quit":
  706.                     print('Quiting Program\n',
  707.                             '=' * 40, sep = '')
  708.  
  709.                     print("5.....")
  710.                     time.sleep(1)
  711.  
  712.                     print("4....")
  713.                     time.sleep(1)
  714.  
  715.                     print("3...")
  716.                     time.sleep(1)
  717.  
  718.                     print("2..")
  719.                     time.sleep(1)
  720.  
  721.                     print("1.")
  722.                     time.sleep(1)
  723.                     print("=" * 40)
  724.                          
  725.                     quit()
  726.  
  727.                 else:
  728.                     print("========================================")
  729.                     page_index()
  730.                    
  731.             except ValueError:
  732.                 page_index()
  733.  
  734.         except ValueError:
  735.             page_index()
  736.  
  737.  
  738.            
  739. def module_1():   # Finished and Working :)
  740.  
  741.     import random
  742.    
  743.     title = "|       Caesar Cipher Encryption       |"
  744.     extras = len(title)
  745.     banner = "=" * extras
  746.     print("\n",banner,"\n",title," \n",banner,"\n", sep = '')
  747.  
  748.     try:
  749.         shift = random.randrange(-999,999)
  750.            
  751.         word = input("Please enter a word: ")
  752.         word = word.lower().strip()
  753.            
  754.         cypher = dict(zip("abcdefghijklmnopqrstuvwxyz",range(26)))
  755.         inputypher = dict(zip(range(26),"abcdefghijklmnopqrstuvwxyz"))
  756.  
  757.  
  758.         if word.isdigit():
  759.             print("\nInvalid Input")
  760.  
  761.             try:
  762.                 question = input("Would you like to try again? ")
  763.                 question = question.lower()
  764.  
  765.                 if question == "yes":
  766.                     module_1()
  767.  
  768.                 else:
  769.                     page_1()
  770.  
  771.             except ValueError:
  772.                 print("\nInvalid Input")
  773.  
  774.                 try:
  775.                     question = input("Would you like to try again? ")
  776.                     question = question.lower()
  777.  
  778.                     if question == "yes":
  779.                         module_1()
  780.  
  781.                     else:
  782.                         page_1()
  783.  
  784.                 except ValueError:
  785.                     page_1()
  786.  
  787.         else:
  788.             # encypher
  789.             cyphertext = ""
  790.             for index in word:
  791.                 if index.isalpha():
  792.                     cyphertext += inputypher[(cypher[index] + shift) % 26]
  793.                 else:
  794.                     cyphertext += index
  795.  
  796.             # inputypher
  797.             plaintext = ""
  798.             for index in cyphertext:
  799.                 if index.isalpha():
  800.                     plaintext += inputypher[(cypher[index] - shift) % 26]
  801.                 else:
  802.                     plaintext += index
  803.  
  804.             print("\nEncrypted Text:", cyphertext,
  805.                   "\ninputrypted Text:", plaintext,"\n")
  806.            
  807.             try:
  808.                 question = input("Again? ")
  809.                 question = question.lower()
  810.                
  811.                 if question == "yes":
  812.                     module_1()
  813.                 else:
  814.                     print("============================================")
  815.                     page_1()
  816.                    
  817.             except ValueError:
  818.                 page_1()
  819.                
  820.     except ValueError:
  821.         try:
  822.             print("\nInvalid Input")
  823.             question = input("Would you like to try again? ")
  824.             question = question.lower()
  825.            
  826.             if question == "yes":
  827.                 module_1()
  828.             else:
  829.                 print("============================================")
  830.                 page_1()
  831.                
  832.         except ValueError:
  833.             print("============================================")
  834.             page_1()
  835.            
  836.     print("============================================")
  837.  
  838.     page_1()
  839.  
  840.  
  841. def module_2():
  842.     print("NOT YET WORKING")
  843.     page_1()
  844.  
  845.  
  846. def module_3():           # Finished and Working :)
  847.     from random import randint
  848.     import time
  849.        
  850.     options = ["Rock", "Paper", "Scissors"]
  851.     computer = options[randint(0,2)]
  852.     player = False
  853.  
  854.     print('Rock, Paper, Scissors\n',
  855.           'How to Play:\n', '=' * 40,
  856.           '\nType your choice of:\n',
  857.           'Rock, Paper or Scissors\n',
  858.           'Any other input will prompt\n',
  859.           'you to quit the game\n',
  860.           'Type "quit" if you really wish to\n',
  861.           'quit the game\n',
  862.           '=' * 40, sep = "")
  863.          
  864.     while player == False:
  865.        
  866.         player = input("Rock, Paper, Scissors? ")
  867.  
  868.         if player == computer:
  869.             print("Tie!\n")
  870.  
  871.         elif player == "Rock":
  872.             if computer == "Paper":
  873.                 print("You lose!", computer, "covers Rock \n")
  874.             else:
  875.                 print("You win! Rock smashes", computer,"\n")
  876.  
  877.         elif player == "rock":
  878.             if computer == "Paper":
  879.                 print("You lose!", computer, "covers Rock \n")
  880.             else:
  881.                 print("You win! Rock smashes", computer,"\n")
  882.  
  883.         elif player == "Paper":
  884.             if computer == "Scissors":
  885.                 print("You lose!", computer, "cut Paper \n")
  886.             else:
  887.                 print("You win! Paper covers", computer,"\n")
  888.  
  889.         elif player == "paper":
  890.             if computer == "Scissors":
  891.                 print("You lose!", computer, "cut Paper \n")
  892.             else:
  893.                 print("You win! Paper covers", computer,"\n")
  894.  
  895.         elif player == "Scissors":
  896.             if computer == "Rock":
  897.                 print("You lose...", computer, "smashes Scissors \n")
  898.             else:
  899.                 print("You win! Scissors cuts", computer,"\n")
  900.  
  901.         elif player == "scissors":
  902.             if computer == "Rock":
  903.                 print("You lose...", computer, "smashes Scissors \n")
  904.             else:
  905.                 print("You win! Scissors cuts", computer,"\n")
  906.  
  907.         elif player == "quit":
  908.             print("=" * 40,
  909.                   '\nQuiting Game......\n',
  910.                   '=' * 40, sep = '')
  911.             print("5.....")
  912.             time.sleep(1)
  913.  
  914.             print("4....")
  915.             time.sleep(1)
  916.  
  917.             print("3...")
  918.             time.sleep(1)
  919.  
  920.             print("2..")
  921.             time.sleep(1)
  922.  
  923.             print("1.")
  924.             time.sleep(1)
  925.             print("=" * 40)
  926.            
  927.             page_1()
  928.  
  929.         elif player == "Quit":
  930.             print("============================================")
  931.             print("=" * 40,
  932.                   '\nQuiting Game......\n',
  933.                   '=' * 40, sep = '')
  934.             print("5.....")
  935.             time.sleep(1)
  936.  
  937.             print("4....")
  938.             time.sleep(1)
  939.  
  940.             print("3...")
  941.             time.sleep(1)
  942.  
  943.             print("2..")
  944.             time.sleep(1)
  945.  
  946.             print("1.")
  947.             time.sleep(1)
  948.             print("=" * 40)
  949.            
  950.             page_1()
  951.  
  952.         else:
  953.             print("That's not a valid play. Check your spelling!\n")
  954.            
  955.             question = input("Would you like to quit game? ").lower()
  956.  
  957.             if question == "yes":
  958.                 player = True
  959.                 print("============================================")
  960.                 page_1()
  961.  
  962.             else:
  963.                 player = False
  964.            
  965.         #player was set to True, but we want it to be False so the loop continues
  966.  
  967.         player = False
  968.         computer = options[randint(0,2)]
  969.        
  970.  
  971.    
  972. def module_4():       #Finished and Working :)
  973.     try:
  974.         print("==================================================")
  975.         salary = int(input("Salary Amount: "))
  976.         no_tax_boundary = int(input("No Tax Boundary: "))
  977.         rate1_boundary = int(input("Rate Boundary: "))
  978.         rate1 = float(input("Tax Rate 1 (%): "))
  979.         rate2 = float(input("Tax Rate 2 (%): "))
  980.  
  981.         rate_1 = rate1_boundary - no_tax_boundary
  982.         Tax1 = round(rate_1 / 100 * rate1)
  983.        
  984.         rate_2 = salary - rate1_boundary
  985.         Tax2 = round(rate_2 / 100 * rate2)
  986.        
  987.         print("==================================================")
  988.         print("Salary: $", salary, sep = "")
  989.         print("Amount to be taxed at: ", rate1, "%: $", rate_1, sep = "")
  990.         print("Tax at rate 1: $", Tax1, sep = "")
  991.         print("Amount to be taxed at: ", rate2, "%: $", rate_2, sep = "")
  992.         print("Tax at rate 1: $", Tax2, sep = "")
  993.         print("==================================================")
  994.        
  995.         Total_tax = Tax1 + Tax2
  996.         Net_Pay = salary - Total_tax
  997.  
  998.         print("Total tax: $", Total_tax, "\n\nNet pay: $", Net_Pay, sep = "")
  999.         print("==================================================")
  1000.  
  1001.         try:
  1002.             question = input("Another Calculation? ")
  1003.  
  1004.             question = question.lower()
  1005.  
  1006.             if question == "yes":
  1007.                 module_4()()
  1008.             else:
  1009.                 print("============================================")
  1010.                 page_1()
  1011.                
  1012.         except ValueError:
  1013.             page_1()
  1014.        
  1015.     except ValueError:
  1016.         try:
  1017.             print("Invalid Input")
  1018.             question = input("Would you like to try again? ")
  1019.             question = question.lower()
  1020.            
  1021.             if question == "yes":
  1022.                 module_4()()
  1023.             else:
  1024.                 print("============================================")
  1025.                 page_1()
  1026.                
  1027.         except ValueError:
  1028.             page_1()
  1029.            
  1030.         page_1()
  1031.  
  1032.  
  1033.  
  1034. def module_5():       # Finished and Working :)
  1035.     try:
  1036.         print("Calculator\n============================================")
  1037.         q = input("Enter your mathimatical equation: ")
  1038.         q = str(eval(q))
  1039.         print("= " + q)
  1040.         print("============================================")
  1041.  
  1042.         try:
  1043.             question = input("Would you like to try again? ")
  1044.             question = question.lower()
  1045.  
  1046.             if question == "yes":
  1047.                 module_5()()
  1048.             else:
  1049.                 print("============================================")
  1050.                 page_1()
  1051.                
  1052.         except ValueError:
  1053.             print("Invalid Input")
  1054.  
  1055.             try:
  1056.                 question = input("Would you like to try again? ")
  1057.                 question = question.lower()
  1058.  
  1059.                 if question == "yes":
  1060.                     module_5()()
  1061.                 else:
  1062.                     print("============================================")
  1063.                     page_1()
  1064.  
  1065.             except ValueError:
  1066.                 page_1()
  1067.  
  1068.     except ValueError:
  1069.         print("Invalid Input")
  1070.         try:
  1071.             question = input("Would you like to try again? ")
  1072.             question = question.lower()
  1073.            
  1074.             if question == "yes":
  1075.                 module_5()()
  1076.             else:
  1077.                 print("============================================")
  1078.                 page_1()
  1079.                
  1080.         except ValueError:
  1081.             page_1()
  1082.            
  1083.         page_1()
  1084.  
  1085.  
  1086.  
  1087. def module_6():
  1088.     import random
  1089.  
  1090.     try:
  1091.         number_of_randomness = int(input("How many binary numbers would you like to generate: "))
  1092.         print("=========================================================")
  1093.         k = True
  1094.         i = 0
  1095.    
  1096.         while k == True:
  1097.  
  1098.             a = random.randrange(0,2)
  1099.             b = random.randrange(0,2)
  1100.             c = random.randrange(0,2)
  1101.             d = random.randrange(0,2)
  1102.             e = random.randrange(0,2)
  1103.             f = random.randrange(0,2)
  1104.             g = random.randrange(0,2)
  1105.             h = random.randrange(0,2)
  1106.        
  1107.             print(a,b,c,d,e,f,g,h, sep = "")
  1108.  
  1109.             i = i + 1
  1110.             if i == number_of_randomness:
  1111.                 k = False
  1112.            
  1113.         try:
  1114.             print("=========================================================")
  1115.             question = input("Would you like to generate more random binary numbers? ")
  1116.             question = question.lower()
  1117.            
  1118.             if question == "yes":
  1119.                 module_6()()
  1120.                
  1121.             else:
  1122.                 print("=========================================================")
  1123.                 page_2()
  1124.                
  1125.         except ValueError:
  1126.             try:
  1127.                 print("Invalid Input")
  1128.                 question = input("Would you like to try again? ")
  1129.                 question = question.lower()
  1130.                 print("=========================================================")
  1131.                 if question == "yes":
  1132.                     module_6()()
  1133.                    
  1134.                 else:
  1135.                     print("=========================================================")
  1136.                     page_2()
  1137.                
  1138.             except ValueError:
  1139.                 page_2()        
  1140.          
  1141.     except ValueError:
  1142.         try:
  1143.             print("Invalid Input")
  1144.             question = input("Would you like to try again? ")
  1145.             question = question.lower()
  1146.  
  1147.             if question == "yes":
  1148.                 module_6()()
  1149.                
  1150.             else:
  1151.                 print("=========================================================")
  1152.                 page_2()
  1153.            
  1154.         except ValueError:
  1155.             page_2()
  1156.  
  1157.         page_2()
  1158.  
  1159.  
  1160.        
  1161. def module_7():
  1162.     print("\nEvolution of Text\n" + "=" * 40)
  1163.     try:
  1164.         import string
  1165.         import random
  1166.         import time
  1167.  
  1168.         possible_characters = string.ascii_lowercase + string.digits + string.ascii_uppercase + " .,!?;:\@#$%^&*()[]{}|/\'+-๑\""
  1169.  
  1170.         target = input("Enter your target text: ")
  1171.         print("")
  1172.         if target == "quit":
  1173.             page_2()
  1174.  
  1175.         else:
  1176.             attempt = ''.join(random.choice(possible_characters) for i in range(len(target)))
  1177.             next_attempt = ''
  1178.  
  1179.             completed = False
  1180.  
  1181.             generation = 0
  1182.  
  1183.             while completed == False:
  1184.                 print(attempt)
  1185.                 next_attempt = ''
  1186.                 completed = True
  1187.                 for i in range(len(target)):
  1188.                    
  1189.                     if attempt[i] != target[i]:
  1190.                         completed = False
  1191.                         next_attempt += random.choice(possible_characters)
  1192.                        
  1193.                     else:
  1194.                         next_attempt += target[i]
  1195.                        
  1196.                 generation += 1
  1197.                 attempt = next_attempt
  1198.                 time.sleep(0.1)
  1199.                
  1200.             print("=" * 40 + "\nTarget matched! That took " + str(generation) + " Passes")
  1201.  
  1202.             try:
  1203.                 question = input("Again? ")
  1204.                 print("=" * 40)
  1205.                 question = question.lower()
  1206.  
  1207.                 if question == "yes":
  1208.                     module_7()()
  1209.  
  1210.             except ValueError:
  1211.                 print("Invalid Input\Taking you back to main Module")
  1212.                 page_2()
  1213.        
  1214.  
  1215.        
  1216.     except ValueError:
  1217.         print("Please Try again")
  1218.         module_7()()
  1219.     page_2()
  1220.  
  1221.  
  1222.    
  1223. def module_8():
  1224.     print("\nEvolution of Text Re-work\n" + "=" * 40)
  1225.     try:
  1226.         import string
  1227.         import random
  1228.         import time
  1229.  
  1230.         possible_characters = string.ascii_lowercase * 25 + string.digits * 25 + string.ascii_uppercase * 25 + """
  1231. .,!?;:\@#$%^&*()[]{}|/\'+-๑•ิ.•ั๑۩۞۩๑♬✿.。.:*★☆εїз℡❣·۰•●○●ōゃ♥♡๑۩ﺴ☜☞☎☏♡⊙◎☺☻✖╄ஐﻬ►◄▧▨♨◐◑↔
  1232. ↕▪▫☼♦▀▄█▌▐░▒▬♦◊◦☼♠♣▣▤▥▦▩◘◙◈♫♬♪♩♭♪の☆→あぃ£❤#@&*❁❀✿✾❃✺❇❈❊❉✱✲✩✫✬✭✮✰☆★✪¤☼ ☽☾
  1233. ❤♡ღ☻☺❂◕⊕☉ΘoO♋☯㊝⊙◎◑◐۰•●▪▫。゚๑☜☞☂♨☎☏×÷=≠≒∞ˇ±√⊥▶▷◀◁☀☁☂☃☄★☆☇☈☉☊☋☌☍☑☒☢☸☹☺☻☼♠♡
  1234. ♢♣♤♥♦♧♨♩✙✈✉✌✁♝♞♯♩♪♫♬♭♮☎☏☪♈♨₪™♂✿♥の↑↓←→↖↗↙↘㊣◎○●⊕⊙○ △▲☆★◇◆■□▽▼§¥〒¢£※♀♂&⁂℡ↂ░
  1235. ▣▤▥▦▧✐✌✍✡✓✔✕✖♂♀♥♡☜☞☎☏⊙◎☺☻►◄▧▨♨◐◑↔↕♥♡▪▫☼♦▀▄█▐░▒▬♦◊◘◙◦☼♠♣▣▤▥▦▩◘◙◈♫♬♪♩♭♪✄☪☣☢☠░ ▒▬♦◊◦♠
  1236. ♣▣۰•●❤●•۰►◄▧▨♨◐◑↔↕▪▫☼♦♧♡♂♀♠♣♥❤☜☞☎☏⊙◎☺☻☼▧▨♨◐◑↔↕▪▒◊◦▣▤▥ ▦▩◘◈◇♬♪♩♭♪の★☆→あぃ£Ю〓§♤♥▶¤๑⊹⊱⋛⋌⋚⊰⊹
  1237. ๑۩۩۩۩๑๑۩۞۩๑✲❈✿✲❈➹~.◕‿-❣✚✪✣✤✥✦❉❥❦❧❃❂❁❀✄☪☣☢☠☭ღ▶▷◀◁☀☁☂☃☄★☆☇☈⊙☊☋☌☍ⓛⓞⓥ
  1238. ⓔ๑•ิ.•ั๑ ๑۩۞۩๑ ♬✿☉♡♢♣♤♥♦♧♨♩✙✈✉✌✁✎✐❀✰❁❤❥❦❧➳➽εїз℡❣·۰•●○●ゃōゃ♥♡๑۩ﺴ☜☞☎☏♡⊙◎☺☻✖╄ஐﻬ
  1239. ◄▧▨♨◐◑↔↕▪▫ ☼▬♦◊◦☼♠♣▣▤▩◘◙◈♫♬♪♩♭♪の☆→あぃ£❤❁❀✿✾❃✺❇❈❊❉✱✲✩✫✬✭✰★✪¤☼☀☽☾❤♡ღ☻☺❂◕⊕☉Θo
  1240. O♋☯㊝⊙◎◑◐۰•●▪▫。゚๑☜☞☂♨☎☏▶▷◀◁☀☁☂☃☄☇☈☉☊☋☌☍☑☒☢☸☹☺☻☼☽☾♠♝♞♯♩♪♫♬♭♮☎☏☪♈♨º₪¤큐«»™♂
  1241. ✿♥の↑↓←→↖↗↙↘㊣◎○● ⊙○△▲☆★◇◆■□▽▼§¥〒¢£※♀♂©®⁂ↂ░▣▤▦▧✐✌✍✡✓✔✕✖♂♀♥♡☜☞☎☏⊙◎☺☻►◄▧▨♨◐◑↔↕♥♡▪
  1242. ▫☼♦▬◊◘◙◦☼♠♣▣▤▦▩◘◙◈♫ ♬♪♩♭♪✄☪☣☢☠㊊㊋㊌㊍㊎㊏㊐㊑㊒㊓㊔㊕㊖㊗㊘㊜㊝㊞㊟㊠㊡㊢㊣㊤㊥㊦㊧㊨㊩㊪㊫㊬㊭㊮㊯㊰
  1243. ✗✘✚✪✣✤✥✦✧✩✫✬✭✮✯✰✱✲✳❃❂❁❀✿✾✽✼✻✺✹✸✷✶✵✴❄❅❆❇❈❉❊❋❖☀☂☁【】┲❣✪✤✥✦❉
  1244. ❥❦❧❃❂❁❀✄☪☣☢☠☭♈➸✓✔✕✖:◢◣◥◤▽▧▨▣▤▦▩◘◙▓▒░™凸の๑۞๑๑ﺴ۩๑o‧”’‧o❆べò⊹⊱⋛⋋⋌⋚⊰⊹ⓛⓞⓥⓔ☀☼☜☞⊙® ◈♦
  1245. ◊◦◇◆εїз❃❂❁❀✿✾✽✼✻✺✹✸✶✵✴❄❅❆❇❈❉❊❋❖❤❥❦❧↔↕▪→︷╅╊✿´`¸•´¯❤︺´¯`••.¸¸.•´¯`•.•●•۰.•
  1246. ´¯`•.•• ••.•´¯`•.••—¤÷`¤*´÷¤——•·÷·•— ①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄ
  1247. ⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ⊙▂⊙✖づ ̄³づc”-*x-๏_๏-◐o◑⊙…⊙๏-ิ_•๏•ิ
  1248. ︶︹
  1249. """
  1250.  
  1251.         target = input("Enter your target text: ")
  1252.         print("")
  1253.         if target == "quit":
  1254.             page_2()
  1255.  
  1256.         else:
  1257.             attempt = ''.join(random.choice(possible_characters) for i in range(len(target)))
  1258.             next_attempt = ''
  1259.  
  1260.             completed = False
  1261.  
  1262.             generation = 0
  1263.  
  1264.             while completed == False:
  1265.                 print(attempt)
  1266.                 next_attempt = ''
  1267.                 completed = True
  1268.                 for i in range(len(target)):
  1269.                    
  1270.                     if attempt[i] != target[i]:
  1271.                         completed = False
  1272.                         next_attempt += random.choice(possible_characters)
  1273.                        
  1274.                     else:
  1275.                         next_attempt += target[i]
  1276.                        
  1277.                 generation += 1
  1278.                 attempt = next_attempt
  1279.                 time.sleep(0.1)
  1280.                
  1281.             print("=" * 40 + "\nTarget matched! That took " + str(generation) + " Passes")
  1282.  
  1283.             try:
  1284.                 question = input("Again? ")
  1285.                 print("=" * 40)
  1286.                 question = question.lower()
  1287.  
  1288.                 if question == "yes":
  1289.                     module_8()()
  1290.  
  1291.             except ValueError:
  1292.                 print("Invalid Input\Taking you back to main Module")
  1293.                 page_2()
  1294.        
  1295.  
  1296.        
  1297.     except ValueError:
  1298.         print("Please Try again")
  1299.         module_8()()
  1300.  
  1301.     page_2()
  1302.  
  1303.  
  1304.  
  1305.    
  1306. def module_9():
  1307.     print("\n0's & 1's\n" + "=" * 40)
  1308.     try:
  1309.         import string
  1310.         import random
  1311.         import time
  1312.  
  1313.         possible_characters = string.digits
  1314.  
  1315.         target = input("Enter your target text: ")
  1316.         print("")
  1317.        
  1318.         if target == "quit":
  1319.             page_2()
  1320.  
  1321.         else:
  1322.             attempt = ''.join(random.choice(possible_characters) for i in range(len(target)))
  1323.             next_attempt = ''
  1324.  
  1325.             completed = False
  1326.  
  1327.             generation = 0
  1328.  
  1329.             while completed == False:
  1330.                 print(attempt)
  1331.                 next_attempt = ''
  1332.                 completed = True
  1333.                 for i in range(len(target)):
  1334.                    
  1335.                     if attempt[i] != target[i]:
  1336.                         completed = False
  1337.                         next_attempt += random.choice(possible_characters)
  1338.                        
  1339.                     else:
  1340.                         next_attempt += target[i]
  1341.                        
  1342.                 generation += 1
  1343.                 attempt = next_attempt
  1344.                 time.sleep(0.5)
  1345.                
  1346.             print("=" * 40 + "\nTarget matched! That took " + str(generation) + " Passes")
  1347.  
  1348.             try:
  1349.                 question = input("Again? ")
  1350.                 print("=" * 40)
  1351.                 question = question.lower()
  1352.  
  1353.                 if question == "yes":
  1354.                     module_9()()
  1355.  
  1356.             except ValueError:
  1357.                 print("Invalid Input\Taking you back to main Module")
  1358.                 page_2()
  1359.        
  1360.  
  1361.        
  1362.     except ValueError:
  1363.         print("Please Try again")
  1364.         module_9()()
  1365.     page_2()
  1366.  
  1367.  
  1368. def module_10():
  1369.     print("NOT YET WORKING")
  1370.     page_3()
  1371.  
  1372.  
  1373. def module_11():           # Finished and Working :)
  1374.     import random
  1375.     import time
  1376.    
  1377.     my_dict =   {
  1378.                     "Base-2 number system" : "binary",
  1379.                     "Number system that uses the characters 0-F" : "hexidecimal",
  1380.                     "7-bit text encoding standard" : "ascii",
  1381.                     "16-bit text encoding standard" : "unicode",
  1382.                     "A number that is bigger than the maximum number that can be stored" : "overflow",
  1383.                     "8 bits" : "byte",
  1384.                     "1024 bytes" : "kilobyte",
  1385.                     'What does "RAM" stand for' : "random access memory",
  1386.                     'What does "ROM" stand for' : "Read-only Memory",
  1387.                     'What does "GPU" stand for' : "Graphics Processing Unit",
  1388.                     'What does "CPU" stand for' : "Central Processing Unit",
  1389.                     "What is the main component of a computer that strings everything together" : "The Motherboard",
  1390.                     "Picture Element. The smallest component of a bitmapped image" : "pixel",
  1391.                     "How Heavy was the first computer" : "27 Tons",
  1392.                     "How much of the world's currency is digital currency (%)" : "90%",
  1393.                     "A binary representation of a program" : "machine code",
  1394.                     "How much of the worlds currency is physical money (%)" : "10%",
  1395.                     "What is the longest word that you can write only using one row your keyboard" : "typewriter",
  1396.                     "What is the average amount of new viruses created each month" : "5000",
  1397.                     "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",
  1398.                     "If there was a computer as powerfull as the human brain, how much memory could it store (hint: in Terabytes)" : "3850TB",
  1399.                     "An intersting thing that HP, Microsoft and Apple have in common" : "They were all started in a garage",
  1400.                     "How much of daily emails sent is spam (%)" : "80%",
  1401.                     "The original name of windows" : "Interface Manager",
  1402.                     "When was the first ever hard disk drive made" : "1979",
  1403.                     "How much could the first hard disk drive store" : "5mb",
  1404.                     "The average person normally blinks 20 times a minute, but when using a computer how much per minute? (hint: less)" : "7 times per minute",
  1405.                     "A in ASCII" : "65",
  1406.                     "a in ASCII" : "97",
  1407.                     "What do you call a structured set of data, held in a computer" : "A database",
  1408.                     "What are formatting symbols" : "Invisible characters used to mark spaces, paragraphs and page breaks",
  1409.                     "How is information/data stored in a computer" : "binary",
  1410.                     "How is \"Phone\" represented in ASCII" : "080 104 111 110 101",
  1411.                     "Covert the ASCII word: \"115 117 109 109 101 114\" " : "summer",
  1412.                     "What does Moore's Law state:" : "That the number of processes a computer can perform approximately doubles every two years",
  1413.                     """If a computer has these specifications:
  1414. Intel Core i7-6800K 6 Core 3.4 GHz
  1415. 15 MB CPU cache
  1416. 32 GB DDR4 2800MHz
  1417. NVIDIA GTX1080 8GB GDDR5
  1418. 2TB SATA3 HDD
  1419. 500GB SATA3 SSD
  1420. What is its total data storage? (hint: Terabytes)""" : "2.5TB",
  1421.                     """If a computer has these specifications:
  1422. Intel Core i7-6800K 6 Core 3.4 GHz
  1423. 15 MB CPU cache
  1424. 32 GB DDR4 2800MHz
  1425. NVIDIA GTX1080 8GB GDDR5
  1426. 2TB SATA3 HDD
  1427. 500GB SATA3 SSD
  1428. What is its GPU and its specs""" : "NVIDIA GTX1080 8GB GDDR5",
  1429.                     """If a computer has these specifications:
  1430. Intel Core i7-6800K 6 Core 3.4 GHz
  1431. 15 MB CPU cache
  1432. 32 GB DDR4 2800MHz NVIDIA
  1433. GTX1080 8GB GDDR5
  1434. 2TB SATA3 HDD
  1435. 500GB SATA3 SSD
  1436. What is its CPU and its specs?""" : "Intel Core i7-6800K 6 core 3.4 GHz",
  1437.                     "How many different values can we represent with a byte" : "256",
  1438.                     "If we want to represent 30 different values, how many bits do we need" : "5",
  1439.                     "What is the decimal equivalent of 00101111" : "47",
  1440.                     "What is the decimal equivalent of 10000000" : "128",
  1441.                     "What is the biggest decimal number 8 bits can represent" : "256",
  1442.                     "What is the binary equivalent of 123" : "01111011",
  1443.                     "What has more memory capacity a TB or GB" : "TB",
  1444.                     "What kind of software gives you free access to the program but no source code" : "Freeware",
  1445.                     "What kind of software gives you free access to the program and access to its source code" : "Open Source",
  1446.                     "What does GUI stand for" : "Graphical user interface",
  1447.                     "What does CLI stand for" : "Command-line interface",
  1448.                     "What network model does the internet use" : "Packet-switched networking",
  1449.                     "What protocol should I choose on my email client if I want to access my emails using multiple devices?" : "IMAP",
  1450.                     "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",
  1451.                     "What is the domain name in this email address 'Ineedcomputerhelp@computerhelp.co.nz'" : "computerhelp.co.nz",
  1452.                     "What is the key difference between blogs and micro-blogs" : "Micro-blogs are designed for sharing smaller peices of content",
  1453.                     "What is a Firewall" : "A system/protocol that prevents unauthorised access to a network",
  1454.                     "What is a Proxy" : "A system/protocol that intercepts and processes requests from clients and servers",
  1455.                     "What is a Client" : "A piece of hardware or software that accesses a service made avaliable by a server",
  1456.                     "What is a Server" : "A computer program or device that provides functionality for other programs or devices, otherwise known as clients",
  1457.                     "What is a text editor" : "is a piece of software used for editing plain text",
  1458.                     "What is a word processor" : "a program or machine used for storing, manipulating and formatting text entered from a keyboard",
  1459.                     "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",
  1460.                     "What is the word 'Program' in ASCII" : "080 114 111 103 114 097 109",
  1461.                     "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",
  1462.                     "How do you represent '123456789' in ASCII" : "049 050 051 052 053 054 055 056 057"
  1463.                      
  1464.                 }
  1465.  
  1466.     title = "|      Computing Revision Quiz       |"
  1467.     extras = len(title)
  1468.     banner = "=" * extras
  1469.     print("\n",banner,"\n",title," \n",banner, "\n", sep = '')
  1470.     print("Just a heads up, all answers are super specific\n",
  1471.           "However is not case sensitive\n",
  1472.           "Hope the quiz helps :)", sep = '')
  1473.     try:
  1474.         playing = True
  1475.  
  1476.         while playing == True:
  1477.             try:
  1478.                 score = 0
  1479.                 num = int(input("\nHow many questions would you like: "))
  1480.                
  1481.                 for i in range(num):
  1482.  
  1483.                     question = (random.choice( list(my_dict.keys())))
  1484.                     answer = my_dict[question]
  1485.  
  1486.                     print("\nQuestion " + str(i+1) )
  1487.                     print(question  + "?")
  1488.  
  1489.                     guess = input("> ")
  1490.  
  1491.                     if guess.lower() == answer.lower():
  1492.                         print("Correct!")
  1493.                         score += 1
  1494.  
  1495.                     elif guess.lower() == "r":
  1496.                         print("=" * 40, "\nRestarting Quiz.....", sep = '')
  1497.  
  1498.                         print("5.....")
  1499.                         time.sleep(1)
  1500.  
  1501.                         print("4....")
  1502.                         time.sleep(1)
  1503.  
  1504.                         print("3...")
  1505.                         time.sleep(1)
  1506.  
  1507.                         print("2..")
  1508.                         time.sleep(1)
  1509.  
  1510.                         print("1.")
  1511.                         time.sleep(1)
  1512.                         print("=" * 40)
  1513.                         module_11()()
  1514.  
  1515.                     elif guess.lower() == "quit":
  1516.                         print("=" * 40, "\nReturning back to main Module.....", sep = '')
  1517.  
  1518.                         print("5.....")
  1519.                         time.sleep(1)
  1520.  
  1521.                         print("4....")
  1522.                         time.sleep(1)
  1523.  
  1524.                         print("3...")
  1525.                         time.sleep(1)
  1526.  
  1527.                         print("2..")
  1528.                         time.sleep(1)
  1529.  
  1530.                         print("1.")
  1531.                         time.sleep(1)
  1532.                         print("=" * 40)
  1533.                        
  1534.                         page_3()
  1535.  
  1536.                     elif guess.lower() == "q":
  1537.                         print("=" * 40, "\nReturning back to main Module.....", sep = '')
  1538.  
  1539.                         print("5.....")
  1540.                         time.sleep(1)
  1541.  
  1542.                         print("4....")
  1543.                         time.sleep(1)
  1544.  
  1545.                         print("3...")
  1546.                         time.sleep(1)
  1547.  
  1548.                         print("2..")
  1549.                         time.sleep(1)
  1550.  
  1551.                         print("1.")
  1552.                         time.sleep(1)
  1553.                         print("=" * 40)
  1554.                        
  1555.                         page_3()
  1556.                        
  1557.                     else:
  1558.                         print("Nope!\n",
  1559.                               "Answer: ", answer, sep = '')
  1560.                        
  1561.      
  1562.                 print("\nYou got " + str(score), "/", num, " correct", sep = '')
  1563.  
  1564.                 if score == num:
  1565.                     print("Perfect Score\n", '=' * 40, sep = '')
  1566.                
  1567.                 again = input("Enter any key to play again?, or 'q' to quit: ")
  1568.  
  1569.                 try:
  1570.                     if again.lower() == 'q':
  1571.                         print("=" * 40, "\nReturning back to Main Module.....\n",
  1572.                           "=" * 40, sep = '')
  1573.                         print("5.....")
  1574.                         time.sleep(1)
  1575.  
  1576.                         print("4....")
  1577.                         time.sleep(1)
  1578.  
  1579.                         print("3...")
  1580.                         time.sleep(1)
  1581.  
  1582.                         print("2..")
  1583.                         time.sleep(1)
  1584.  
  1585.                         print("1.")
  1586.                         time.sleep(1)
  1587.                         print("=" * 40)
  1588.                        
  1589.                         playing = False
  1590.                         page_3()
  1591.                        
  1592.                 except ValueError:
  1593.                     page_3()
  1594.  
  1595.             except ValueError:
  1596.                
  1597.                 print("Invalid Input\nReturning back to main Module.....\n", "=" * 40, sep = '')
  1598.  
  1599.                 print("5.....")
  1600.                 time.sleep(1)
  1601.  
  1602.                 print("4....")
  1603.                 time.sleep(1)
  1604.  
  1605.                 print("3...")
  1606.                 time.sleep(1)
  1607.  
  1608.                 print("2..")
  1609.                 time.sleep(1)
  1610.  
  1611.                 print("1.")
  1612.                 time.sleep(1)
  1613.                 print("=" * 40)
  1614.                
  1615.                 page_3()
  1616.                
  1617.                
  1618.     except ValueError:
  1619.         print("Invalid Input")
  1620.         try:
  1621.             question = input("Would you like to try again? ")
  1622.             question = question.lower()
  1623.            
  1624.             if question == "yes":
  1625.                 module_11()()
  1626.                
  1627.             else:
  1628.                 print("=" * 40, "\nReturning back to Main Module.....\n",
  1629.                       "=" * 40, sep = '')
  1630.  
  1631.                 print("5.....")
  1632.                 time.sleep(1)
  1633.  
  1634.                 print("4....")
  1635.                 time.sleep(1)
  1636.  
  1637.                 print("3...")
  1638.                 time.sleep(1)
  1639.  
  1640.                 print("2..")
  1641.                 time.sleep(1)
  1642.  
  1643.                 print("1.")
  1644.                 time.sleep(1)
  1645.                 print("=" * 40)
  1646.                
  1647.                 page_3()
  1648.                
  1649.         except ValueError:
  1650.             page_3()
  1651.            
  1652.         page_3()
  1653.  
  1654.  
  1655.    
  1656. def module_12():           # Finished and Working :)
  1657.     import random
  1658.     import time
  1659.    
  1660.     my_dict =   {
  1661.                     """Base-2 number system:
  1662.  
  1663. a) Binary
  1664. b) Hexidecimal
  1665. c) ASCII
  1666. d) unicode""" : "A",
  1667.                     """Number system that uses the characters 0-F:
  1668.  
  1669. a) Binary
  1670. b) Hexidecimal
  1671. c) ASCII
  1672. d) unicode""" : "B",
  1673.                     """7-bit text encoding standard:
  1674.  
  1675. a) Binary
  1676. b) Hexidecimal
  1677. c) ASCII
  1678. d) unicode""" : "C",
  1679.                     """16-bit text encoding standard:
  1680.  
  1681. a) Binary
  1682. b) Hexidecimal
  1683. c) ASCII
  1684. d) unicode""" : "D",
  1685.                     """A number that is bigger than the maximum number that can be stored:
  1686.  
  1687. a) Over-capacity
  1688. b) Overflow
  1689. c) Surplus
  1690. d) Overabundance""" : "B",
  1691.                     """8 bits:
  1692.  
  1693. a) Bit
  1694. b) Byte
  1695. c) Byt
  1696. d) Unit""" : "B",
  1697.                     """1024 bytes:
  1698.  
  1699. a) Megabyte
  1700. b) Megabit
  1701. c) Kilobyte
  1702. d) Mebibit""" : "C",
  1703.                     """What does "RAM" stand for:
  1704.  
  1705. a) Remote Access Memory
  1706. b) Read All Memory
  1707. c) Random Access Memory
  1708. d) Really Anoying Mother""" : "C",
  1709.                     """What does "ROM" stand for:
  1710.  
  1711. a) Read-only Memory
  1712. b) Record of Merit
  1713. c) Range of Memory
  1714. d) Roll-over Memory""" : "A",
  1715.                     """What does "GPU" stand for:
  1716.  
  1717. a) General Processing Unit
  1718. b) Graphics Processing Unit
  1719. c) General Power Unit
  1720. d) General Propietary Unifier""" : "B",
  1721.                     """What does "CPU" stand for:
  1722.  
  1723. a) Computer Pick Up
  1724. b) Central Processing Unit
  1725. c) Commanding Process Unit
  1726. d) Corporate Processing Unit""" : "B",
  1727.                     "What is the main component of a computer that strings everything together" : "The Motherboard",
  1728.                     "Picture Element. The smallest component of a bitmapped image" : "pixel",
  1729.                     "How Heavy was the first computer" : "27 Tons",
  1730.                     "How much of the world's currency is digital currency (%)" : "90%",
  1731.                     "A binary representation of a program" : "machine code",
  1732.                     "How much of the worlds currency is physical money (%)" : "10%",
  1733.                     "What is the longest word that you can write only using one row your keyboard" : "typewriter",
  1734.                     """What is the average amount of new viruses created each month:
  1735.  
  1736. a) 10000
  1737. b) 1200
  1738. c) 5000
  1739. d) 8000""" : "C",
  1740.                     """If there was a computer as powerfull as the human brain, how many operations could it do per second:
  1741.  
  1742. a) 0.38 Quintillion
  1743. b) 4 Million
  1744. c) 12 Billion
  1745. d) 5 Octillion""" : "A",
  1746.                     """If there was a computer as powerfull as the human brain, how much memory could it store:
  1747.  
  1748. a) 5GB
  1749. b) 10TB
  1750. c) 3850TB
  1751. d) 40000GB""" : "C",
  1752.                     """An intersting thing that HP, Microsoft and Apple have in common:
  1753.  
  1754. a) They all are technological companys
  1755. b) They were all started in a garage
  1756. c) They all sell very cheap products
  1757. d) They are all partners
  1758. e) They all wish to control the digital world
  1759. f) They're founders all had the same vision""" : "B",
  1760.                     "How much of daily emails sent is spam (%)" : "80%",
  1761.                     """What is was original name of windows:
  1762.  
  1763. a) Digital worlds
  1764. b) Interface Manager
  1765. c) Computing Manager
  1766. d) Operating Systems""" : "B",
  1767.                     """When was the first ever hard disk drive made:
  1768.  
  1769. a) 1979
  1770. b) 1845
  1771. c) 1967
  1772. d) 2001""" : "A",
  1773.                     """How much could the first hard disk drive store:
  1774.  
  1775. a) 5mb
  1776. b) 10mb
  1777. c) 10kb
  1778. d) 40mb""" : "A",
  1779.                     """The average person normally blinks 20 times a minute, but when using a computer how much per minute?
  1780.  
  1781. a) 7
  1782. b) 8
  1783. c) 12
  1784. d) 2""" : "A",
  1785.                     "A in ASCII" : "65",
  1786.                     "a in ASCII" : "97",
  1787.                     "What do you call a structured set of data, held in a computer" : "A database",
  1788.                     """What are formatting symbols:
  1789.  
  1790. a) Any Input made by a keyboard input
  1791. b) Invisible characters used to mark spaces, paragraphs and page breaks
  1792. c) A hand gesture you use to identify boring people
  1793. d) Any other character other than the alphabet""" : "B",
  1794.                     "How is information/data stored in a computer" : "in binary",
  1795.                     "How is \"Phone\" represented in ASCII" : "080 104 111 110 101",
  1796.                     "Covert the ASCII word: \"115 117 109 109 101 114\" " : "summer",
  1797.                     """What does Moore's Law state:
  1798.  
  1799. a) Boring old Hags shouldn't use computers
  1800. b) Anyone can use technology, except for "blondes"
  1801. c) That a computers processing power apporximately doubles every two years
  1802. d) That a computer capability to process things far exceeds that of a human""" : "C",
  1803.                     """If a computer has these specifications:
  1804. Intel Core i7-6800K 6 Core 3.4 GHz
  1805. 15 MB CPU cache
  1806. 32 GB DDR4 2800MHz
  1807. NVIDIA GTX1080 8GB GDDR5
  1808. 2TB SATA3 HDD
  1809. 500GB SATA3 SSD
  1810. What is its total data storage? (hint: Terabytes)""" : "2.5TB",
  1811.                     """If a computer has these specifications:
  1812. Intel Core i7-6800K 6 Core 3.4 GHz
  1813. 15 MB CPU cache
  1814. 32 GB DDR4 2800MHz
  1815. NVIDIA GTX1080 8GB GDDR5
  1816. 2TB SATA3 HDD
  1817. 500GB SATA3 SSD
  1818. What is its GPU and its specs
  1819.  
  1820. a) NVIDIA GTX 1080 8GB GDDR5
  1821. b) AMD R900 4GB
  1822. c) NVIDIA TITAN X 8GB GDDR5
  1823. d) NVIDIA GTX 1070 8GB GDDR5""" : "A",
  1824.                     """If a computer has these specifications:
  1825. Intel Core i7-6800K 6 Core 3.4 GHz
  1826. 15 MB CPU cache
  1827. 32 GB DDR4 2800MHz NVIDIA
  1828. GTX1080 8GB GDDR5
  1829. 2TB SATA3 HDD
  1830. 500GB SATA3 SSD
  1831. What is its CPU and its specs?
  1832.  
  1833. a) Intel Core i7-6800K 6 core 3.4 GHz
  1834. b) Sata 3 HDD
  1835. c) AMD Ryzen 7
  1836. d) Intel AMD Core 9 i9-5500k 8.9 GHz""" : "A",
  1837.                     """How many different values can we represent with a byte:
  1838.  
  1839. a) 128
  1840. b) 32
  1841. c) 40
  1842. d) 256""" : "D",
  1843.                     """If we want to represent 30 different values, how many bits do we need:
  1844. a) 7
  1845. b) 12
  1846. c) 8
  1847. d) 5""" : "D",
  1848.                     """What is the decimal equivalent of 00101111:
  1849. a) 20
  1850. b) 40
  1851. c) 47
  1852. d) 80""" : "C",
  1853.                     "What is the decimal equivalent of 10000000" : "128",
  1854.                     "What is the biggest decimal number 8 bits can represent" : "256",
  1855.                     "What is the binary equivalent of 123" : "01111011",
  1856.                     "What has more memory capacity a TB or GB" : "TB",
  1857.                     "What kind of software gives you free access to the program but no source code" : "Freeware",
  1858.                     "What kind of software gives you free access to the program and access to its source code" : "Open Source",
  1859.                     "What does GUI stand for" : "Graphical user interface",
  1860.                     "What does CLI stand for" : "Command-line interface",
  1861.                     "What network model does the internet use" : "Packet-switch networking",
  1862.                     "What protocol should I choose on my email client if I want to access my emails using multiple devices?" : "IMAP",
  1863.                     """What is the difference between synchronous an asynchronous communications:
  1864.  
  1865. a) Synchronous communications deliver the message instantly meanwhile Asynchronous delays the message,
  1866. therefore the reciever gets the message after some time
  1867. b) Synchronous communications are synced with your local time, while Asynchronous isn't
  1868. c) Synchronous communications are "peer to peer", while Asynchronous is for multiple connections
  1869. d) Synchronous communincations physical communications i.e actual real life conversations,
  1870. while Asynchronous are online conversations""" : "A",
  1871.                     "What is the domain name in this email address 'Ineedcomputerhelp@computerhelp.co.nz'" : "computerhelp.co.nz",
  1872.                     """What is the key difference between blogs and micro-blogs:
  1873.  
  1874. a) Nothing
  1875. b) Micro-blogs are designed for sharing smaller peices of content
  1876. c) Micro-blogs are made up of physical content i.e not digital
  1877. d) Micro-blogs only take about smaller "not so important" subjects""" : "B",
  1878.                     """What is a Firewall:
  1879.  
  1880. a) A wall that is on fire
  1881. b) A system/protocol that prevents unauthorised access to a network
  1882. c) A system/protocol made to stop you from watching porn
  1883. d) A system/protocol that allows you to access unauthorised areas of a network""" : "B",
  1884.                     """What is a Proxy:
  1885.  
  1886. a) A system/protocol that allows you to access unauthorise areas of a network
  1887. b) a system/protocol that allows you to watch porn
  1888. c) A system/protocol that intercepts and processes requests from clients and servers
  1889. d) Nothing really, is just a made up word""" : "C",
  1890.                     """What is a Client:
  1891.  
  1892. a) A piece of hardware or software that accesses a service made avaliable by a server
  1893. b) Are people businesses deal with
  1894. c) Are people using this program
  1895. d) A piece of software that helps people find work""" : "A",
  1896.                     """What is a Server:
  1897.  
  1898. a) Something/Someone that provides a service
  1899. b) A computer that displays life-like behaviours that help you through hardship or complex problems
  1900. c) A computer program or device that provides functionality for other programs or devices, otherwise known as clients
  1901. d) A program you run on your computer that allows you to access the world wide web""" : "C",
  1902.                     """What is a text editor:
  1903. a) Programs such as Microsoft Word, that allow you to edit and format text
  1904. b) Any old programming software
  1905. c) A program that converts your handwritten text so that it can be view on your computer, making your handwriting nicer and neater
  1906. d) Is a piece of software used for editing plain text""" : "D",
  1907.                     """What is a word processor
  1908. a) A program made for programming
  1909. b) A program or machine used for storing, manipulating and formatting text entered from a keyboard
  1910. c) A function in Microsoft Word
  1911. d) A person who takes your written document and edits it so that its better""" : "B",
  1912.                     """What is the main difference between a word processor and a text editor
  1913.  
  1914. a) A text editor can only be used to create programs,
  1915. while a word processor can only format and create text documents
  1916. b) A text editor can only edit text contained within a range that is the only the alphabet,
  1917. while a word procesor can edit an kind of text
  1918. c) A text editor is used for editing plain text,
  1919. while a word processor can edit text as well as add formatting to the text
  1920. d) Nothing""" : "C",
  1921.                     "What is the word 'Program' in ASCII" : "080 114 111 103 114 097 109",
  1922.                     "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",
  1923.                     "How do you represent '123456789' in ASCII" : "049 050 051 052 053 054 055 056 057",
  1924.                     """What kind of coding standard is Machine Code:
  1925.  
  1926. a) Hexidecimal
  1927. b) Unicode
  1928. c) ASCII
  1929. d) Binary
  1930. e) Bynary""" : "D"
  1931.                      
  1932.                 }
  1933.  
  1934.     title = "|      Computing Revision Quiz Version 2      |"
  1935.     extras = len(title)
  1936.     banner = "=" * extras
  1937.     print("\n",banner,"\n",title," \n",banner, "\n", sep = '')
  1938.     print("Just a heads up, all answers are super specific\n",
  1939.           "However is not case sensitive\n",
  1940.           "Some are Multi Choice\n",
  1941.           "Hope the quiz helps :)", sep = '')
  1942.     try:
  1943.         playing = True
  1944.  
  1945.         while playing == True:
  1946.             try:
  1947.                 score = 0
  1948.                 num = int(input("\nHow many questions would you like: "))
  1949.                
  1950.                 for i in range(num):
  1951.  
  1952.                     question = (random.choice( list(my_dict.keys())))
  1953.                     answer = my_dict[question]
  1954.  
  1955.                     print("\nQuestion " + str(i+1) )
  1956.                     print(question  + "?")
  1957.  
  1958.                     guess = input("> ")
  1959.  
  1960.                     if guess.lower() == answer.lower():
  1961.                         print("Correct!")
  1962.                         score += 1
  1963.  
  1964.                     elif guess.lower() == "r":
  1965.                         print("=" * 40, "\nRestarting Quiz.....", sep = '')
  1966.  
  1967.                         print("5.....")
  1968.                         time.sleep(1)
  1969.  
  1970.                         print("4....")
  1971.                         time.sleep(1)
  1972.  
  1973.                         print("3...")
  1974.                         time.sleep(1)
  1975.  
  1976.                         print("2..")
  1977.                         time.sleep(1)
  1978.  
  1979.                         print("1.")
  1980.                         time.sleep(1)
  1981.                         print("=" * 40)
  1982.                         module_12()()
  1983.  
  1984.                     elif guess.lower() == "quit":
  1985.                         print("=" * 40, "\nReturning back to main Module.....", sep = '')
  1986.  
  1987.                         print("5.....")
  1988.                         time.sleep(1)
  1989.  
  1990.                         print("4....")
  1991.                         time.sleep(1)
  1992.  
  1993.                         print("3...")
  1994.                         time.sleep(1)
  1995.  
  1996.                         print("2..")
  1997.                         time.sleep(1)
  1998.  
  1999.                         print("1.")
  2000.                         time.sleep(1)
  2001.                         print("=" * 40)
  2002.                        
  2003.                         page_3()
  2004.  
  2005.                     elif guess.lower() == "q":
  2006.                         print("=" * 40, "\nReturning back to main Module.....", sep = '')
  2007.  
  2008.                         print("5.....")
  2009.                         time.sleep(1)
  2010.  
  2011.                         print("4....")
  2012.                         time.sleep(1)
  2013.  
  2014.                         print("3...")
  2015.                         time.sleep(1)
  2016.  
  2017.                         print("2..")
  2018.                         time.sleep(1)
  2019.  
  2020.                         print("1.")
  2021.                         time.sleep(1)
  2022.                         print("=" * 40)
  2023.                        
  2024.                         page_3()
  2025.                        
  2026.                     else:
  2027.                         print("Nope!\n",
  2028.                               "Answer: ", answer, sep = '')
  2029.                        
  2030.      
  2031.                 print("\nYou got " + str(score), "/", num, " correct", sep = '')
  2032.  
  2033.                 if score == num:
  2034.                     print("Perfect Score\n", '=' * 40, sep = '')
  2035.                
  2036.                 again = input("Enter any key to play again?, or 'q' to quit: ")
  2037.  
  2038.                 try:
  2039.                     if again.lower() == 'q':
  2040.                         print("=" * 40, "\nReturning back to Main Module.....\n",
  2041.                           "=" * 40, sep = '')
  2042.                         print("5.....")
  2043.                         time.sleep(1)
  2044.  
  2045.                         print("4....")
  2046.                         time.sleep(1)
  2047.  
  2048.                         print("3...")
  2049.                         time.sleep(1)
  2050.  
  2051.                         print("2..")
  2052.                         time.sleep(1)
  2053.  
  2054.                         print("1.")
  2055.                         time.sleep(1)
  2056.                         print("=" * 40)
  2057.                        
  2058.                         playing = False
  2059.                         page_3()
  2060.                        
  2061.                 except ValueError:
  2062.                     page_3()
  2063.  
  2064.             except ValueError:
  2065.                
  2066.                 print("Invalid Input\nReturning back to main Module.....\n", "=" * 40, sep = '')
  2067.  
  2068.                 print("5.....")
  2069.                 time.sleep(1)
  2070.  
  2071.                 print("4....")
  2072.                 time.sleep(1)
  2073.  
  2074.                 print("3...")
  2075.                 time.sleep(1)
  2076.  
  2077.                 print("2..")
  2078.                 time.sleep(1)
  2079.  
  2080.                 print("1.")
  2081.                 time.sleep(1)
  2082.                 print("=" * 40)
  2083.                
  2084.                 page_3()
  2085.                
  2086.                
  2087.     except ValueError:
  2088.         print("Invalid Input")
  2089.         try:
  2090.             question = input("Would you like to try again? ")
  2091.             question = question.lower()
  2092.            
  2093.             if question == "yes":
  2094.                 module_12()()
  2095.                
  2096.             else:
  2097.                 print("=" * 40, "\nReturning back to Main Module.....\n",
  2098.                       "=" * 40, sep = '')
  2099.  
  2100.                 print("5.....")
  2101.                 time.sleep(1)
  2102.  
  2103.                 print("4....")
  2104.                 time.sleep(1)
  2105.  
  2106.                 print("3...")
  2107.                 time.sleep(1)
  2108.  
  2109.                 print("2..")
  2110.                 time.sleep(1)
  2111.  
  2112.                 print("1.")
  2113.                 time.sleep(1)
  2114.                 print("=" * 40)
  2115.                
  2116.                 page_3()
  2117.                
  2118.         except ValueError:
  2119.             page_3()
  2120.            
  2121.         page_3()
  2122.  
  2123.  
  2124.        
  2125.  
  2126.    
  2127.  
  2128. def module_13():           # Finished and Working :)
  2129.     try:
  2130.         print("Description Generator V2.0")
  2131.         question_2 = str(input("What would you like to describe: "))
  2132.         question_3 = str(input("Enter Description: "))
  2133.         print("\n",question_2," ",question_3, sep = '')
  2134.  
  2135.         try:
  2136.             question = input("Would you like to try again? ")
  2137.             question = question.lower()
  2138.            
  2139.             if question == "yes":
  2140.                 module_13()()
  2141.                
  2142.             else:
  2143.                 print("============================================")
  2144.                 page_3()
  2145.                
  2146.         except ValueError:
  2147.             try:
  2148.                 print("Invalid Input")
  2149.                 question = input("Would you like to try again? ")
  2150.                 question = question.lower()
  2151.                
  2152.                 if question == "yes":
  2153.                     module_13()()
  2154.                    
  2155.                 else:
  2156.                     print("============================================")
  2157.                     page_3()
  2158.                
  2159.             except ValueError:
  2160.                 page_3()
  2161.                
  2162.     except ValueError:
  2163.         page_3()
  2164.                
  2165.  
  2166.  
  2167. def module_14():
  2168.     import random
  2169.  
  2170.     try:
  2171.         number_of_randomness = int(input("How many numbers would you like to generate: "))
  2172.         print("=========================================================")
  2173.         k = True
  2174.         i = 0
  2175.    
  2176.         while k == True:
  2177.             a = random.randrange(0, number_of_randomness)
  2178.  
  2179.             print(a)
  2180.            
  2181.             i = i + 1
  2182.             if i == number_of_randomness:
  2183.                 k = False
  2184.            
  2185.         try:
  2186.             print("=========================================================")
  2187.             question = input("Would you like to generate more random numbers? ")
  2188.             question = question.lower()
  2189.            
  2190.             if question == "yes":
  2191.                 module_14()()
  2192.                
  2193.             else:
  2194.                 print("=========================================================")
  2195.                 page_3()
  2196.                
  2197.         except ValueError:
  2198.             try:
  2199.                 print("Invalid Input")
  2200.                 question = input("Would you like to try again? ")
  2201.                 question = question.lower()
  2202.                 print("=========================================================")
  2203.                 if question == "yes":
  2204.                     module_14()()
  2205.                    
  2206.                 else:
  2207.                     print("=========================================================")
  2208.                     page_3()
  2209.                
  2210.             except ValueError:
  2211.                 page_3()        
  2212.          
  2213.     except ValueError:
  2214.         try:
  2215.             print("Invalid Input")
  2216.             question = input("Would you like to try again? ")
  2217.             question = question.lower()
  2218.  
  2219.             if question == "yes":
  2220.                 module_14()()
  2221.                
  2222.             else:
  2223.                 print("=========================================================")
  2224.                 page_3()
  2225.            
  2226.         except ValueError:
  2227.             page_3()
  2228.  
  2229.         page_3()
  2230.        
  2231.  
  2232.  
  2233. def module_15():
  2234.     print("NOT YET WORKING")
  2235.     page_3()
  2236.  
  2237. def module_16():
  2238.     print("NOT YET WORKING")
  2239.     page_4()
  2240.  
  2241. def module_17():
  2242.     print("NOT YET WORKING")
  2243.     page_4()
  2244.  
  2245. def module_18():
  2246.     print("NOT YET WORKING")
  2247.     page_4()
  2248.  
  2249. def module_19():
  2250.     print("NOT YET WORKING")
  2251.     page_4()
  2252.  
  2253. def module_20():
  2254.     print("NOT YET WORKING")
  2255.     page_4()
  2256.  
  2257. def module_21():
  2258.     print("NOT YET WORKING")
  2259.     page_5()
  2260.  
  2261. def module_22():
  2262.     print("NOT YET WORKING")
  2263.     page_5()
  2264.  
  2265. def module_23():
  2266.     print("NOT YET WORKING")
  2267.     page_5()
  2268.  
  2269. def module_24():
  2270.     print("NOT YET WORKING")
  2271.     page_5()
  2272.  
  2273. def module_25():
  2274.     print("NOT YET WORKING")
  2275.     page_5()
  2276.  
  2277. def help():
  2278.     print("""
  2279. ===========================================
  2280. Each number corresponds with a module
  2281. Please select/enter a number to access
  2282. a module
  2283. type "quit" to exit a module or quit
  2284. the main program
  2285. Any other invalid input will also prompt
  2286. you to quit the program
  2287. ===========================================""")
  2288.     page_index()
  2289.  
  2290. page_index()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement