Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Mainframe:
- phoneData = []
- # Waiting till I need it ^^^^
- class phoneProcessing:
- restartValue = 0
- stored_phoneNumbers = []
- # Assign the phone number
- # (And by the way, I know it doesn't charge stuff from paypal yet, and that's because I'm not really good with bs4 yet.)
- def assign_number(zipCode, First_Name, Last_Name):
- def restart(First_Name, Last_Name, ZipCode):
- phoneProcessing.restartValue = 1
- assign_number(ZipCode, First_Name, Last_Name)
- for loops in range(0, len(Mainframe.phoneData), 1):
- SnoopingList = ["Name: " + str(First_Name) + " " + str(Last_Name) + " Zip Code: " + str(zipCode),]
- if Mainframe.phoneData[loops] == SnoopingList:
- print("Denied.")
- else:
- # Formula for assigning phone numbers (Not the real formula)
- phoneformula = (str(zipCode[0])+str(zipCode[1])+str(zipCode[2]))+"-"+str(len(First_Name))+str(len(Last_Name))
- if len(phoneformula) < 16:
- # Wrote this variable so I didn't have to write another 20 lines of code
- difference = 16-len(phoneformula)
- for loops in range(0, difference, 1):
- while phoneformula < 16:
- phoneformula + str(loops)
- if phoneformula == 16:
- break
- update = [phoneformula]
- phoneProcessing.stored_phoneNumbers = update
- restart(First_Name, Last_Name, zipCode)
- return loops
- if len(phoneformula) == 16 or phoneProcessing.restartValue == 1:
- # Made an update list so I could add it to the phone data for the Mainframe
- updateList = ["Name: "+str(First_Name)+" "+str(Last_Name)+" Zip Code: "+str(zipCode),]
- Mainframe.phoneData + updateList
- # Wow, 36 lines of code for one function? And all it is is sorting....
Advertisement
Add Comment
Please, Sign In to add comment