Advertisement
Guest User

Finaliser

a guest
Feb 24th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.96 KB | None | 0 0
  1. #Finaliser
  2.  
  3. import shutil, os, os.path
  4.  
  5. def Socrates():
  6.     global SocNo
  7.     SocNo=(str(input("Insert Socrates Number: ")))
  8.     if SocNo.isalpha():
  9.         print("Invalid input.")
  10.         print("")
  11.         Socrates()
  12.     print("You have chosen: " +str(SocNo))
  13.     return Socrates
  14.  
  15. def DriveLetter():
  16.     global DriveChoice
  17.     DriveChoice=(str.upper(input("M or N Drive?: ")))
  18.     if DriveChoice.upper() == "M":
  19.         print ("You have chosen drive: M:")
  20.     elif DriveChoice.upper()== "N":
  21.         print ("You have chosen drive: N:")
  22.     elif DriveChoice.isalnum():
  23.         print("Invalid input.")
  24.         print("")
  25.         DriveLetter()
  26.     return DriveLetter
  27.  
  28. def Submission():
  29.     global SubNo
  30.     SubNo = (str(input("Submission Number: ")))
  31.     if SubNo.isalpha():
  32.        print("Invalid input.")
  33.        print("")
  34.        Submission()
  35.     return Submission
  36.  
  37. def Answers():
  38.     print("")
  39.     print("Socrates Number: " + str(SocNo))
  40.     #print("Drive Letter: " + str(DriveChoice))
  41.     print("Submission Number: " + str(SubNo))
  42.     print("")
  43.  
  44. def Choice():
  45.     UserChoice=str(input("Are these values correct? [Y/N]: "))
  46.     if UserChoice.upper() == "N":
  47.         print("")
  48.         print("-----------------------------------")
  49.         print("")
  50.         Socrates()
  51.         print("")
  52.         DriveLetter()
  53.         print("")
  54.         Submission()
  55.         print("")
  56.         Answers()
  57.         print("")
  58.         Choice()
  59.     elif UserChoice.upper() == "Y":
  60.         return
  61.     elif UserChoice.isalnum():
  62.         print("Invalid input.")
  63.         print("")
  64.         Choice()
  65.     return Choice
  66.  
  67. def SocYear():
  68.     if os.path.exists("Z:\\Case Notes\\2020\\" + SocNo):
  69.        print("Socrates number " + SocNo + " already exists.")
  70.     elif os.path.exists("Z:\\Case Notes\\2019\\" + SocNo):
  71.        print("Socrates number " + SocNo + " already exists.")
  72.     elif os.path.exists("Z:\\Case Notes\\2018\\" + SocNo):
  73.        print("Socrates number " + SocNo + " already exists.")
  74.     elif os.path.exists("Z:\\Case Notes\\2017\\" + SocNo):
  75.        print("Socrates number " + SocNo + " already exists.")
  76.        return
  77.     else:
  78.        print("Socrates number " + SocNo + " does not exist.")
  79.     return
  80.  
  81. #    if os.path.exists("Z:\\Case Notes\\2019\\" + SocNo):
  82. #       SocNo[0:2] == "19"
  83. #       print("Socrates number " + SocNo + " already exists.")
  84. #    else:
  85. #        print("Socrates number " + SocNo + " does not exist.")
  86. #    return
  87.  
  88. #    if os.path.exists("Z:\\Case Notes\\2018\\" + SocNo):
  89. #       SocNo[0:2] == "18"
  90. #       print("Socrates number " + SocNo + " already exists.")
  91. #    else:
  92. #        print("Socrates number " + SocNo + " does not exist.")
  93. #    return
  94.  
  95. #    if os.path.exists("Z:\\Case Notes\\2017\\" + SocNo):
  96. #       SocNo[0:2] == "17"
  97. #       print("Socrates number " + SocNo + " already exists.")
  98. #    else:
  99. #        print("Socrates number " + SocNo + " does not exist.")
  100. #    return
  101.  
  102. def SubmissionP():
  103.     if os.path.exists("Z:\\Case Notes\\2020\\" + SocNo + "\\Submission " + SubNo):
  104. #       SocNo[0:2] == "20"
  105.        print("Submission " + SubNo + " already exists.")
  106.     elif os.path.exists("Z:\\Case Notes\\2019\\" + SocNo + "\\Submission " + SubNo):
  107. #       SocNo[0:2] == "19"
  108.        print("Submission " + SubNo + " already exists.")
  109.     elif os.path.exists("Z:\\Case Notes\\2018\\" + SocNo + "\\Submission " + SubNo):
  110. #       SocNo[0:2] == "18"
  111.        print("Submission " + SubNo + " already exists.")
  112.     elif os.path.exists("Z:\\Case Notes\\2017\\" + SocNo + "\\Submission " + SubNo):
  113. #       SocNo[0:2] == "17"
  114.        print("Submission " + SubNo + " already exists.")
  115.        return
  116.     else:
  117.         print("Submission " + SubNo + " does not exist.")
  118.     return
  119.  
  120. #    if os.path.exists("Z:\\Case Notes\\2019\\" + SocNo + "\\Submission " + SubNo):
  121. #       SocNo[0:2] == "19"
  122. #       print("Submission " + SubNo + " already exists.")
  123. #    else:
  124. #        print("Submission " + SubNo + " does not exist.")
  125. #    return
  126.  
  127. #    if os.path.exists("Z:\\Case Notes\\2018\\" + SocNo + "\\Submission " + SubNo):
  128. #       SocNo[0:2] == "18"
  129. #       print("Submission " + SubNo + " already exists.")
  130. #    else:
  131. #        print("Submission " + SubNo + " does not exist.")
  132. #    return
  133.  
  134. #    if os.path.exists("Z:\\Case Notes\\2017\\" + SocNo + "\\Submission " + SubNo):
  135. #       SocNo[0:2] == "17"
  136. #       print("Submission " + SubNo + " already exists.")
  137. #    else:
  138. #        print("Submission " + SubNo + " does not exist.")
  139. #    return
  140.  
  141.  
  142. print("")
  143. print(" █▀▀ █ █▄░█ ▄▀█ █░░ █ █▀ █▀▀ █▀█")
  144. print(" █▀░ █ █░▀█ █▀█ █▄▄ █ ▄█ ██▄ █▀▄")
  145. print("        Case Finalisation")
  146. print("")
  147. Socrates()
  148. print("")
  149. #DriveLetter()
  150. #print("")
  151. Submission()
  152. print("")
  153. Answers()
  154. print("")
  155. Choice()
  156. print("")
  157. SocYear()
  158. print("")
  159. SubmissionP()
  160. print("")
  161.  
  162. #if os.path.exists(DriveChoice + ":\\"):
  163. #    print("True")
  164. #    print("")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement