<reponame>HackBulgaria/Programming-101-Python-2020-Spring
import random
import time
from pprint import pprint

STUDENT_NAMES = [
    '<NAME>',
    '<NAME>',
    '<NAME>',
    'Мария-<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    'Redjep ',
    '<NAME>',
]

TEAM_NAMES = [
    'Panda',
    'Dog',
    'Cat',
    'Bear',
    # 'Horse',
    'Elephant',
    'Tiger',
    'Shark',
    'Bat',
    'Wolf',
    'Crocodile',
    'Lion'
]


def generate_teams():
    student_names = STUDENT_NAMES[:]

    for _ in range(20):
        random.shuffle(student_names)

    teams = [student_names[i:i + 2] for i in range(0, len(student_names), 2)]

    # The last team is from 3 students
    teams[-2].extend(teams[-1])
    del teams[-1]

    return {
        team_name: teams[index]
        for index, team_name in enumerate(TEAM_NAMES)
    }


def order_teams_for_final_projects():
    teams = TEAM_NAMES[:]

    for _ in range(50):
        random.shuffle(teams)

    return list(enumerate(teams))


if __name__ == '__main__':
    while True:
        result = order_teams_for_final_projects()
        pprint(result)
        time.sleep(0.1)

import random
import time
from pprint import pprint

STUDENT_NAMES = [
    '<NAME>',
    '<NAME>',
    '<NAME>',
    'Мария-<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    '<NAME>',
    'Redjep ',
    '<NAME>',
]

TEAM_NAMES = [
    'Panda',
    'Dog',
    'Cat',
    'Bear',
    # 'Horse',
    'Elephant',
    'Tiger',
    'Shark',
    'Bat',
    'Wolf',
    'Crocodile',
    'Lion'
]


def generate_teams():
    student_names = STUDENT_NAMES[:]

    for _ in range(20):
        random.shuffle(student_names)

    teams = [student_names[i:i + 2] for i in range(0, len(student_names), 2)]

    # The last team is from 3 students
    teams[-2].extend(teams[-1])
    del teams[-1]

    return {
        team_name: teams[index]
        for index, team_name in enumerate(TEAM_NAMES)
    }


def order_teams_for_final_projects():
    teams = TEAM_NAMES[:]

    for _ in range(50):
        random.shuffle(teams)

    return list(enumerate(teams))


if __name__ == '__main__':
    while True:
        result = order_teams_for_final_projects()
        pprint(result)
        time.sleep(0.1)
# 'Horse', # The last team is from 3 students