Advertisement
JPHowe

Untitled

Apr 24th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.51 KB | None | 0 0
  1. import time
  2.  
  3. f = open("filename.txt","w+")
  4.  
  5. while True:
  6.     print("Hello and Welcome to the device trouble-shooter.")
  7.    
  8.     print("Is your device functioning correctly?")
  9.     answer1=input()
  10.     time.sleep(1)
  11.        
  12.     if answer1==str("yes") or answer1==str("Yes"):
  13.         print("Your device is ok for use.")
  14.         time.sleep(7)
  15.         quit()
  16.        
  17.     if answer1==str("no") or answer1==str("No"):
  18.         print("Ok please answer the questions below.")
  19.        
  20.         print("Have you dropped your phone recently? Yes/No.")
  21.         answer2=input()
  22.         if answer2==str("yes") or answer2==str("Yes"):
  23.             print("Try restarting the phone or charging it up again. If neither work contact the manufacturer.")
  24.             time.sleep(10)
  25.             quit()
  26.         if answer2==str("no") or answer2==str("No"):
  27.             print("Please answer the next question.")
  28.        
  29.         print("Has your phone come into contact with water recently? Yes/No.")
  30.         answer3=input()
  31.         if answer3==str("yes") or answer3==str("Yes"):
  32.             print("Try placing the phone in rice overnight or leave in a warm, dry place for an hour or two. If neither work contact the manufacturer.")
  33.             time.sleep(10)
  34.             quit()
  35.         if answer3==str("no") or answer3==str("No"):
  36.             print("Please answer the next question.")
  37.        
  38.         print("Have you recently done a phone update? Yes/No.")
  39.         answer4=input()
  40.         if answer4==str("no") or answer4==str("No"):
  41.             print("Try checking for a new update or factory reset the device to a previous version of the system software. If neither work contact the manufacturer.")
  42.             time.sleep(10)
  43.             quit()
  44.         if answer4==str("yes") or answer4==str("Yes"):
  45.             print("Please answer the next question.")
  46.        
  47.         print("Has your phone recently experienced temperatures exceeding 50 degrees celcius? Yes/No.")
  48.         answer3=input()
  49.         if answer3==str("yes") or answer3==str("Yes"):
  50.             print("Your phone has most likely suffered internal damage so contact the manufacturer.")
  51.             time.sleep(10)
  52.             quit()
  53.         if answer3==str("no") or answer3==str("No"):
  54.             print("Please answer the next question.")
  55.        
  56.         print("Is your phone over 3 years old? Yes/No.")
  57.         answer3=input()
  58.         if answer3==str("yes") or answer3==str("Yes"):
  59.             print("Your phone has most likely reached the end of its lifetime so please replace it and recycle your current phone.")
  60.             time.sleep(10)
  61.             quit()
  62.         if answer3==str("no") or answer3==str("No"):
  63.             print("Please answer the next question.")
  64.        
  65.         print("Have you recently sat on your phone or had it in your backpocket while sat down? Yes/No.")
  66.         answer3=input()
  67.         if answer3==str("yes") or answer3==str("Yes"):
  68.             print("Your phone may have suffered from internal damage, if the screen is the only visible damage then try having the screen replaced by the manufacturor or a local company specialising it phone repairs.")
  69.             time.sleep(10)
  70.             quit()
  71.         if answer3==str("no") or answer3==str("No"):
  72.             print("Please answer the next question.")
  73.        
  74.         print("Is your phone not charging properly? Yes/No.")
  75.         answer3=input()
  76.         if answer3==str("yes") or answer3==str("Yes"):
  77.             print("You can have your charging port replaced by the manufacturor or a small local company or blow the dirt from the port and try to charge it again.")
  78.             time.sleep(10)
  79.             quit()
  80.         if answer3==str("no") or answer3==str("No"):
  81.             print("Please answer the next question.")
  82.                
  83.         print("Have you broken your speakers? Yes/No.")
  84.         answer3=input()
  85.         if answer3==str("yes") or answer3==str("Yes"):
  86.             print("If the speakers aren't working properly then contact the manufacturor for replacement or repair.")
  87.             time.sleep(10)
  88.             quit()
  89.         if answer3==str("no") or answer3==str("No"):
  90.             print("Please answer the next question.")
  91.        
  92.         print("Is your headphone jack broken? Yes/No.")
  93.         answer3=input()
  94.         if answer3==str("yes") or answer3==str("Yes"):
  95.             print("Test it with different headphones to check if its definetly broken. If it appears to be not working blow dirt and debris from the jack and try again or contact manufacturor for replace or repair.")
  96.             time.sleep(10)
  97.             quit()
  98.         if answer3==str("no") or answer3==str("No"):
  99.             print("Please answer the next question.")
  100.        
  101.         print("Are the buttons broken? Yes/No.")
  102.         answer3=input()
  103.         if answer3==str("yes") or answer3==str("Yes"):
  104.             print("The phone has most likely suffered from internal damage so try and contact a manufacturor for replace or repair to visit a small local company that specialises in phone repairs.")
  105.             time.sleep(10)
  106.             quit()
  107.         if answer3==str("no") or answer3==str("No"):
  108.             print("Please answer the next question.")
  109.         break
  110.  
  111.     if answer1!=("Yes") or ("yes") or ("No") or ("no"):
  112.         print("You have not inputted 'Yes' or 'No'. Please try again.\n")
  113.         time.sleep(2)
  114.  
  115. print("What's your name?")
  116. name=input()
  117. print("What's your email?")
  118. email=input()
  119. f.write(name)
  120. f.write("\n")
  121. f.write(email)
  122.  
  123. f.write("\n\nHave you dropped your device recently? ")
  124. f.write(answer1)
  125. f.write("\nHas your device come into contact with water recently? ")
  126. f.write(answer2)
  127. f.write("\nHave you recently done a device update? ")
  128. f.write(answer3)
  129. f.write("\nHas your device recently experienced temperatures exceeding 50 degrees celcius? ")
  130. f.write(answer4)
  131. f.write("\nIs your device over 3 years old? ")
  132. f.write(answer5)
  133. f.write("\nHave you recently sat on your device or had it in your backpocket while sat down? ")
  134. f.write(answer6)
  135. f.write("\nIs your device not charging properly? ")
  136. f.write(answer7)
  137. f.write("\nHave you broken your speakers? ")
  138. f.write(answer8)
  139. f.write("\nIs your headphone jack broken? ")
  140. f.write(answer9)
  141. f.write("\nAre the buttons broken? ")
  142. f.write(answer10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement