Mar-04-2019, 12:40 AM
this is what i have so far
class batch: def _init_(self, batch_number, components_in_batch): self.batch_number = batch_number self.components_in_batch = components_in_batch class component: def _init_(self, type, size): self.type = type self.size = size components_list = ["1 = Winglet Strut", "2 = Door Handle", "3 = Rudder Pin"] print(components_list) def chosen_component(): print() def chosen_size(): print() print("please select an option")# print("1 = create a batch") print("0 = exit") while True: choice = input("> ") if choice == '1': print("welcome to the program") #batch_number = batch_number + 1 #print("batch number is " + (currentDT.strftime("%d%m%y") + str(batch_number).zfill(4)) break elif choice == '0': print("you have selected to exit program") break else: print("invalid choice") print() while True: print("what component?") component = input("> ") if component == '1': print("you have selected Winglet Strut.") chosen_component == 'component' break elif component == '2': print("you have selected Door Handle") chosen_component == 'component' break elif component == '3': print("you have selected Rudder Pin") chosen_component == 'component' break else: print("invalid choice") sizes_list = ["1 = A320 Series", "2 = A380 Series"] print(sizes_list) while True: print("Please select the size of the of the component") size = input("> ") if size == '1': print("you have selected the A320 Series") chosen_size == 'size' break elif size == '2': print("you have selected the A380 Series") chosen_size == 'size' break else: print("invalid choice") while True: if chosen_component == 1 and chosen_size == 1: print("you have selected Winglet Strut A320 Series") break elif chosen_component == 1 and chosen_size == 2: print("you have selected Winglet Strut A380 Series") break elif chosen_component == 2 and chosen_size == 1: print("you have selected Door Handle A320 Series") break elif chosen_component == 2 and chosen_size == 2: print("you have selected Door Handle A380 Series") break elif chosen_component == 3 and chosen_size == 1: print("you have selected Rudder Pin A320 Series") break elif chosen_component == 3 and chosen_size == 2: print("you have selected Rudder Pin A380 Series") break else: print("invalid process") breaki need to create the batch number still, ive tried a few solutions but it hasnt worked and i also need the final while loop to work as it needs to read from the 2 previous outputs to get its information