Guest User

Untitled

a guest
Jan 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.69 KB | None | 0 0
  1. import sys
  2. import random
  3. def ending():
  4. print('Thank you for using our system.nGood bye!')
  5. input('Press enter to end')
  6. sys.exit()
  7.  
  8.  
  9. print('Welcome to the mobile phone troubleshooting service.')
  10. name = input('What is your name?: ').title()
  11. print('Hello',name,', you will now be asked to state the make of your phone.')
  12. mobile_device = input('What phone make do you have?: ').lower()
  13.  
  14.  
  15. if mobile_device == 'iphone':
  16. import iPhone
  17. elif mobile_device == 'samsung':
  18. import Samsung
  19.  
  20. else:
  21. no = random.randint(10000,99999)
  22. case_number = (name + str(no))
  23.  
  24. solutions = open(case_number+ '.txt','w+')
  25. solutions.write('Customers device: '+mobile_device+'n')
  26.  
  27. issue = input('What is your problem: ')
  28. solutions.write('customers problem '+issue)
  29.  
  30. solutions.close()
  31. print('Sorry, we are unable to help you with your issue at this moment in time, we will assign you a case number and a member of our support staff will contact you in the next 48 hours')
  32. ending()
  33.  
  34. solution = open('Samsung_solutions.txt', 'r+')
  35. solutions = solution.readlines()
  36.  
  37.  
  38. print('Welcome to the mobile phone troubleshooting service for, Samsung')
  39. print('You will now be asked to state what the problem wuth your device is.')
  40.  
  41. user= input('What is the issue with your phone ').lower()
  42.  
  43. #Tuple data type. when program is run, values cannot be changed
  44. apps = ('apps are freezing' 'keep freezing', 'freezing', 'freeze')
  45. if any(i in user for i in apps):
  46. print(solutions[4])
  47.  
  48.  
  49. update = ('version', 'ios', 'updates', "can't update", 'not able to update', 'updating')
  50. if any(i in user for i in update):
  51. print(solutions[5])
  52.  
  53.  
  54. network = ('networks', 'signal', 'wifi', 'internet', "can't connect")
  55. if any(i in user for i in network):
  56. print(solutions[6])
  57.  
  58.  
  59. apps_2 = ('apps are crashing' 'keep crashing', 'crashing', 'crash')
  60. if any(i in user for i in apps_2):
  61. print(solutions[2])
  62.  
  63.  
  64. display = ('display', 'display is slow', 'running slow', 'slow', 'unresponsive', 'phone screen is slow', 'phone is slow')
  65. if any(i in user for i in display):
  66. print(solutions[3])
  67.  
  68. screen = ('screen is cracked', 'cracked', 'screen broken', 'broken screen', 'cracked my screen', 'screen broke', 'broke my phone', 'screen')
  69. if any(i in user for i in screen):
  70. print(solutions[10])
  71.  
  72. Charging = ('charger', "charger won't work", 'not charging', 'charge')
  73. if any(i in user for i in display):
  74. print(solutions[11])
  75.  
  76. camera = ('my camera is blurry', 'camera', 'scratches', ' scratched', 'fuzzy', 'blurry')
  77. if any(i in user for i in display):
  78. print(solutions[13])
  79.  
  80. microphone = ('microphone', "people can't hear me", "can't hear", "hard to understand", 'speak', 'voice' 'can hear' 'calls')
  81. if any(i in user for i in microphone):
  82. print(solutions[12])
  83.  
  84. screen = ('getting hot', 'overheating','heating up' 'overheat', 'over heating')
  85. if any(i in user for i in screen):
  86. print(solutions[9])
  87.  
  88. #task
  89. solution = open('iPhone_solutions.txt', 'r+')
  90. solutions = solution.readlines()
  91.  
  92.  
  93. print('Welcome to the mobile phone troubleshooting service, for iPhone!.')
  94. print('You will now be asked to state what the problem wuth your device is.')
  95.  
  96. user= input('What is the issue with your phone ').lower()
  97.  
  98. #Tuple data type. when program is run, values cannot be changed
  99. apps = ('apps are freezing' 'keep freezing', 'freezing', 'freeze')
  100. if any(i in user for i in apps):
  101. print(solutions[4])
  102.  
  103.  
  104. update = ('version', 'ios', 'updates', "can't update", 'not able to update', 'updating')
  105. if any(i in user for i in update):
  106. print(solutions[5])
  107.  
  108.  
  109. network = ('networks', 'signal', 'wifi', 'internet', "can't connect")
  110. if any(i in user for i in network):
  111. print(solutions[6])
  112.  
  113.  
  114. apps_2 = ('apps are crashing' 'keep crashing', 'crashing', 'crash')
  115. if any(i in user for i in apps_2):
  116. print(solutions[2])
  117.  
  118.  
  119. display = ('display', 'display is slow', 'running slow', 'slow', 'unresponsive', 'phone screen is slow', 'phone is slow')
  120. if any(i in user for i in display):
  121. print(solutions[3])
  122.  
  123. screen = ('screen is cracked', 'cracked', 'screen broken', 'broken screen', 'cracked my screen', 'screen broke', 'broke my phone', 'screen')
  124. if any(i in user for i in screen):
  125. print(solutions[10])
  126.  
  127. Charging = ('charger', "charger won't work", 'not charging', 'charge')
  128. if any(i in user for i in display):
  129. print(solutions[11])
  130.  
  131. camera = ('my camera is blurry', 'camera', 'scratches', ' scratched', 'fuzzy', 'blurry')
  132. if any(i in user for i in display):
  133. print(solutions[13])
  134.  
  135. microphone = ('microphone', "people can't hear me", "can't hear", "hard to understand", 'speak', 'voice' 'can hear' 'calls')
  136. if any(i in user for i in microphone):
  137. print(solutions[12])
  138.  
  139. screen = ('getting hot', 'overheating','heating up' 'overheat', 'over heating')
  140. if any(i in user for i in screen):
  141. print(solutions[9])
Add Comment
Please, Sign In to add comment