repl.it
@Pythonier/

Gift Exchange

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
from random import randint
from replit import clear as c
from time import sleep
p = ['Hadley', 'Ryan', 'Brady', 'Dylan']
hn = randint(0,3)
hg = p[hn]

def red(s):
  return ('\u001b[31m' + str(s) + '\033[0m')
def cyan(s):
  return ('\u001b[36m' + str(s) + '\033[0m')
def green(s):
  return ('\u001b[32m' + str(s) + '\033[0m')
def magenta(s):
  return ('\u001b[35m' + str(s) + '\033[0m')

c()
#input("Hadley, press enter")
c()
while hg == 'Hadley':
  hn = randint(0,3)
  hg = p[hn]

#print("Hadley is giving to: "+ hg)
del p[hn]
#input("Press enter:")
c()

rn = randint(0,2)
rg = p[rn]

#input("Ryan, press enter")
c()
while rg == 'Ryan':
  rn = randint(0,2)
  rg = p[rn]

#print("Ryan is giving to: " + rg)
del p[rn]
#input("Press enter")
c()

bn = randint(0,1)
bg = p[bn]

#input("Brady, press enter")
while bg == 'Brady':
  bn = randint(0,1)
  bg = p[bn]
c()
#print("Brady is giving to: " + bg)
del p[bn]
#input("Press enter")
c()

#input("Dylan, press enter")
c()
dg = p[0]
#print("Dylan is giving to: " + p[0])
#input("Press enter")
c()


while True:
  c()
  print(red("Who are you? (Lowercase)"))
  sleep(.5)
  print(red("Ex: if Dylan enter: d, or parents enter: p"))
  v = input(green("~"))
  c()
  if v == 'h':
    print(red("You are giving to " + hg))
    input(green("Press enter to move on:"))
  elif v == 'r':
    print(red("You are giving to " + rg))
    input(green("Press enter to move on:"))
  elif v == 'b':
    print(red("You are giving to " + bg))
    input(green("Press enter to move on:"))
  elif v == 'd':
    print(red("You are giving to " + dg))
    input(green("Press enter to move on:"))
  elif v == 'p':
    print(red("Hadley is giving to " + hg))
    print(green("Ryan is giving to " + rg))
    print(red("Brady is giving to " + bg))
    print(green("Dylan is giving to " + dg))
    input(red("Press enter to move on:"))
  else:
    print(red("Do not understand!"))
    sleep(1)




print("Hadley is giving to " + hg)
print("Ryan is giving to " + rg)
print("Brady is giving to " + bg)
print("Dylan is giving to " + p[0])

?