Python

profiledfdffd14
MissionNameStartMod.py

from random import randint def createLists(): Adjs = ["Lonely","Unceasing","Blue","Giant"] Nouns = ["Nightmare","Song","Harbinger","Lightning"] return Adjs, Nouns def addMember(lst,str): lst.append(str) return lst def removeMember(lst,str): lst.remove(str) return lst def GenMissionNames(lstAdjs,lstNouns): lstMissionNames = [] intMinListSize = min(len(lstAdjs),len(lstNouns)) ## how long can we loop for count in range(intMinListSize): intAdj = randint(0,len(lstAdjs)-1) intNoun = randint(0,len(lstNouns)-1) lstMissionNames.append(lstAdjs[intAdj] + " " + lstNouns[intNoun]) # Remove elements used lstAdjs.pop(intAdj) lstNouns.pop(intNoun) return lstMissionNames def printMissionNames(lstmn): for missionName in lstmn: print("Operation " + missionName) def main(): lstAdjs, lstNouns = createLists() lstMissionNames = GenMissionNames(lstAdjs,lstNouns) printMissionNames(lstMissionNames)