Skip to content

Commit 4fb6b28

Browse files
authored
Add files via upload
1 parent fffc973 commit 4fb6b28

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

projectdate.py

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#You need to pair your colleagues or friends for a task
2+
#A random date shuffler for a group of friends
3+
#Or a random way to pair your friends for a project
4+
#Then this program is for youu
5+
6+
import random
7+
8+
#Number of pairs you want
9+
num = int(input('Enter number of dates: '))
10+
11+
#list where user inputs would be stored
12+
list_boys =[]
13+
list_girls =[]
14+
15+
for i in range(num):
16+
#takes in user input
17+
boys = input('Enter name of boy: ')
18+
girls = input('Enter name of girl: ')
19+
20+
#Adds user input to the list declared
21+
list_boys.append(boys)
22+
list_girls.append(girls)
23+
24+
#Shuffles the list where the user_input is stored
25+
random.shuffle(list_boys)
26+
random.shuffle(list_girls)
27+
28+
#declaring new list to store the random pairs for output
29+
pairs_list=[]
30+
31+
32+
for i in range(num):
33+
#Adds the new pairs of both lists to the new lists
34+
pairs_list.append((list_boys[i], list_girls[i]))
35+
36+
#I used this while testing, IGNORE
37+
#print(list_boys)
38+
#print(list_girls)
39+
40+
#Prints the new list of random pairs
41+
print(f'Here, have your random selection: {pairs_list}')
42+
43+
44+
45+
46+
47+

0 commit comments

Comments
 (0)