Computer Science, asked by shubham31031991, 5 months ago

USING PYTHON
Make a list of players from the user. Write a program to create two teams randomly selected from the list.

Answers

Answered by valeriy69
1

\small\mathsf\color{pink}{Solution\: using\: python\: 3}

from random import shuffle

players = input("enter names: ").split()

shuffle(players)

mid_idx = len(players) // 2

team_1 = players[:mid_idx]

team_2 = players[mid_idx:]

print(team_1, team_2)

\small\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions