Skip to content

Instantly share code, notes, and snippets.

@samister2k
Created February 8, 2018 15:39
Show Gist options
  • Save samister2k/8c2f20fcfc65f1e1e509ccc1d0a8b712 to your computer and use it in GitHub Desktop.
Save samister2k/8c2f20fcfc65f1e1e509ccc1d0a8b712 to your computer and use it in GitHub Desktop.
import random #This allows you to generate random numbers an data.
name = ["Jordan", "Sam", "James", "Cian"] #This is a list its like a bag filled with names
role = ["leader", "researcher", "secretary", "mechanic", "protector", "presantator"] #Also a list
for num in range(4): #A loop creating 4 jobs to be assigned.
who = random.choice(name) #Random.choice grabs a random item from the list name.
job = random.choice(role) #Random.choice grabs a random item from the listrole.
print(who + job) #Prints out the role assigned to the person.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment