0% found this document useful (0 votes)
6 views2 pages

Python Demo

The document outlines a service function for a computer repair business that allows customers to select various services based on urgency, with corresponding fees. It prompts the user for their name, checks if they are in the records, and allows them to choose a service and urgency level to calculate the fee. If the customer's name is not found, it informs them that the name is unavailable.

Uploaded by

Charls zavior
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Python Demo

The document outlines a service function for a computer repair business that allows customers to select various services based on urgency, with corresponding fees. It prompts the user for their name, checks if they are in the records, and allows them to choose a service and urgency level to calculate the fee. If the customer's name is not found, it informs them that the name is unavailable.

Uploaded by

Charls zavior
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

''def service():'''

print("1. Remove virus, malware or spyware(normal-rm50/urgent-80)\n2. Troubleshoot and fix computer


running slow(normal-rm60/urgent-90)"
"\n3. Laptop screen replacement(normal-rm380/urgent-rm430)\n4. Laptop battery
replacement(normal-rm180/urgent-rm210)"
"\n5. Operating System Format and Installation(normal-rnm100/urgent-rm150)\n6. Data backup
and recovery(normal-rm80/urgent-rm130)")
name=(input("whats your name:"))
updated= False
with open([Link], "r") as file:
lines =[Link]()
with open([Link],"w")as file:
for line in lines:
data= [Link]().split(",")
if data[0]==name:
choice=int(input("which service you want:"))
situation=str(input("whats the situation(normal/urgent):"))
if choice==1:
if situation=="normal":
fee=50
elif situation=="urgent":
fee=80
else:
print("situation not available")
elif choice == 2:
if situation == "normal":
fee = 60
elif situation == "urgent":
fee = 90
else:
print("situation not available")

elif choice==3:
if situation == "normal":
fee = 380
elif situation == "urgent":
fee = 430
else:
print("situation not available")

elif choice == 4:
if situation == "normal":
fee = 180
elif situation == "urgent":
fee = 210
else:
print("situation not available")

elif choice == 5:
if situation == "normal":
fee = 100
elif situation == "urgent":
fee = 150
else:
print("situation not available")

elif choice == 6:
if situation == "normal":
fee = 80
elif situation == "urgent":
fee = 130
else:
print("situation not available")
[Link](f"{data[0]},{choice},{situation},{fee}\n")
updated= True
else:
[Link](line)
if updated:
print("Change service Successful")
else:
print("customer name not available")

You might also like