Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import random
- def ending():
- print('Thank you for using our system.nGood bye!')
- input('Press enter to end')
- sys.exit()
- print('Welcome to the mobile phone troubleshooting service.')
- name = input('What is your name?: ').title()
- print('Hello',name,', you will now be asked to state the make of your phone.')
- mobile_device = input('What phone make do you have?: ').lower()
- if mobile_device == 'iphone':
- import iPhone
- elif mobile_device == 'samsung':
- import Samsung
- else:
- no = random.randint(10000,99999)
- case_number = (name + str(no))
- solutions = open(case_number+ '.txt','w+')
- solutions.write('Customers device: '+mobile_device+'n')
- issue = input('What is your problem: ')
- solutions.write('customers problem '+issue)
- solutions.close()
- 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')
- ending()
- solution = open('Samsung_solutions.txt', 'r+')
- solutions = solution.readlines()
- print('Welcome to the mobile phone troubleshooting service for, Samsung')
- print('You will now be asked to state what the problem wuth your device is.')
- user= input('What is the issue with your phone ').lower()
- #Tuple data type. when program is run, values cannot be changed
- apps = ('apps are freezing' 'keep freezing', 'freezing', 'freeze')
- if any(i in user for i in apps):
- print(solutions[4])
- update = ('version', 'ios', 'updates', "can't update", 'not able to update', 'updating')
- if any(i in user for i in update):
- print(solutions[5])
- network = ('networks', 'signal', 'wifi', 'internet', "can't connect")
- if any(i in user for i in network):
- print(solutions[6])
- apps_2 = ('apps are crashing' 'keep crashing', 'crashing', 'crash')
- if any(i in user for i in apps_2):
- print(solutions[2])
- display = ('display', 'display is slow', 'running slow', 'slow', 'unresponsive', 'phone screen is slow', 'phone is slow')
- if any(i in user for i in display):
- print(solutions[3])
- screen = ('screen is cracked', 'cracked', 'screen broken', 'broken screen', 'cracked my screen', 'screen broke', 'broke my phone', 'screen')
- if any(i in user for i in screen):
- print(solutions[10])
- Charging = ('charger', "charger won't work", 'not charging', 'charge')
- if any(i in user for i in display):
- print(solutions[11])
- camera = ('my camera is blurry', 'camera', 'scratches', ' scratched', 'fuzzy', 'blurry')
- if any(i in user for i in display):
- print(solutions[13])
- microphone = ('microphone', "people can't hear me", "can't hear", "hard to understand", 'speak', 'voice' 'can hear' 'calls')
- if any(i in user for i in microphone):
- print(solutions[12])
- screen = ('getting hot', 'overheating','heating up' 'overheat', 'over heating')
- if any(i in user for i in screen):
- print(solutions[9])
- #task
- solution = open('iPhone_solutions.txt', 'r+')
- solutions = solution.readlines()
- print('Welcome to the mobile phone troubleshooting service, for iPhone!.')
- print('You will now be asked to state what the problem wuth your device is.')
- user= input('What is the issue with your phone ').lower()
- #Tuple data type. when program is run, values cannot be changed
- apps = ('apps are freezing' 'keep freezing', 'freezing', 'freeze')
- if any(i in user for i in apps):
- print(solutions[4])
- update = ('version', 'ios', 'updates', "can't update", 'not able to update', 'updating')
- if any(i in user for i in update):
- print(solutions[5])
- network = ('networks', 'signal', 'wifi', 'internet', "can't connect")
- if any(i in user for i in network):
- print(solutions[6])
- apps_2 = ('apps are crashing' 'keep crashing', 'crashing', 'crash')
- if any(i in user for i in apps_2):
- print(solutions[2])
- display = ('display', 'display is slow', 'running slow', 'slow', 'unresponsive', 'phone screen is slow', 'phone is slow')
- if any(i in user for i in display):
- print(solutions[3])
- screen = ('screen is cracked', 'cracked', 'screen broken', 'broken screen', 'cracked my screen', 'screen broke', 'broke my phone', 'screen')
- if any(i in user for i in screen):
- print(solutions[10])
- Charging = ('charger', "charger won't work", 'not charging', 'charge')
- if any(i in user for i in display):
- print(solutions[11])
- camera = ('my camera is blurry', 'camera', 'scratches', ' scratched', 'fuzzy', 'blurry')
- if any(i in user for i in display):
- print(solutions[13])
- microphone = ('microphone', "people can't hear me", "can't hear", "hard to understand", 'speak', 'voice' 'can hear' 'calls')
- if any(i in user for i in microphone):
- print(solutions[12])
- screen = ('getting hot', 'overheating','heating up' 'overheat', 'over heating')
- if any(i in user for i in screen):
- print(solutions[9])
Add Comment
Please, Sign In to add comment