repl.it
@Bookie0/

Game of Life

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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
import time
from random import randint
m = 0
print ("please enter your username:")
username = input("   ")
time.sleep(1)
print ("loading...")
time.sleep(1)
print ("please enter your password:")
password = input("   ")
time.sleep(1)
print ("loading...")
time.sleep(1)
print ("welcome back, ", (username), "!")
time.sleep(3)

A = False
while A == False:
  print ("_________________________________________________________________________________")
  print ("chatbot = type /ch")
  print ("magic ball = type /mb")
  print ("calculator = type /c")
  print ("work = type /w")
  print ("store = type /s")
  print ("weather = type /we")
  print ("bank account =", (m), "dollars.")
  choice = input("\nwhat would you like to do?\n   ")
  A = True
  if choice == "/mb":
    print ("magic ball selected.")
    time.sleep(2)
    input("ask me 1 question:  ")
    time.sleep(1)
    print ("thinking...")
    time.sleep(1)
    print ("it will depend on your behavior.")
    time.sleep(3)
    A = False
  
  elif choice == "/c":
    print ("calculator selected.")
    time.sleep(2)
    digit1 = int(input("1st number:  "))
    digit2 = int(input("2nd number:   "))
    print ("multiplication, addition, division, substraction.")
    time.sleep(0.5)
    mode = input("\ntype the first letter of the word you want:\n   ")
    if mode == "m":
      print (digit1 * digit2)
      time.sleep(3)
      A = False
    elif mode == "a":
      print (digit1 + digit2)
      time.sleep(3)
      A = False
    elif mode == "d":
      print (digit1 / digit2)
      time.sleep(3)
      A = False
    elif mode == "s":
      print (digit1 - digit2)
      time.sleep(3)
      A = False
      
  elif choice == "/w":
    print ("work selected.")
    time.sleep(1.5)
    print ("working...")
    time.sleep(1.5)
    print ("working...")
    time.sleep(1.5)
    print ("working...")
    time.sleep(2)
    n = randint(1,100)
    print ("you have earned", (n), "dollars.")
    time.sleep(2)
    m += n
    print ("you now have", (m), "dollars in your bank account.")
    time.sleep(3)
    A = False
    
  elif choice == "/s":
    print ("store selected.")
    time.sleep(2)
    print ("items:")
    print ("-car, 200 dollars = type /ca")
    print ("-house, 500 dollars = type /h")
    print ("-go to college, 650 dollars = type /g")
    print ("-cinema, 12 dollars = type /ci")
    print ("you have", (m), "dollars.")
    time.sleep(0.5)
    store = input("what do you want to do?   ")
    if store == "/ca":
      print ("car selected.")
      time.sleep(2)
      
      if m >= 200:
        print ("you have bought the car.")
        time.sleep(2)
        m -= 200
        print ("you now have", (m), "dollars.")
        time.sleep(3)
        A = False 
        
      elif m < 200:
        print ("you don’t have enough money.")
        time.sleep(3)
        A = False
        
    elif store == "/h":
      print ("house selected")
      time.sleep(2)
      
      if m >= 500:
        print ("you have bought the house.")
        time.sleep(2)
        m -= 500
        print ("you now have ", (m), "dollars.")
        time.sleep(3)
        A = False
        
      elif m < 500:
        print ("you don’t have enough money.")
        time.sleep(2)
        A = False
        
    elif store == "/g":
      print ("go to college selected.")
      time.sleep(2)
      
      if m >= 650:
        print ("you can now go to college.")
        time.sleep(2)
        m -= 650
        print ("you now have", (m), "dollars.")
        time.sleep(3)
        A = False
        
      elif m < 650:
        print ("you dont’t have enough money.")
        time.sleep(3)
        A = False
        
    elif store == "/ci":
      print ("cinema selected.")
      time.sleep(2)
      
      if m >= 12:
        print ("you are now going to the cinema.")
        time.sleep(2)
        print ("movie choices: The Return of the Toilet, My Day Yesterday, The Art of Flossing, Operation Dumbo Drop, The Murder of the Pinnaeple, To Buy Or Not To Buy.")
        time.sleep(2)
        movie_choice = input("\nwhat would you like to watch?\n   ")
        print ((movie_choice), "interesting choice!")
        time.sleep(2)
        m -= 12
        print ("you now have", (m), "dollars")
        time.sleep(3)
        A = False
      
      elif m < 12:
        print ("you don't have enough money.")
        time.sleep(3)
        A = False
      
      
  elif choice == "/we":
    print ("weather selected")
    time.sleep(2)
    print ("calculating temperature...")
    time.sleep(2)
    print ("looking at the clouds...")
    time.sleep(2)
    print ("finding out the humidity...")
    time.sleep(2)
    print ("done! ")
    time.sleep(2)
    t = randint(0,22)
    print ("the weather today: -temperature = ", (t), "degrees celcius")
    r = randint(25,100)
    print ("                   -chance of rain = ", (r), "percent")
    h = randint(10,80)
    print ("                   -humidity = ", (h), "percent")
    w = randint(7,18)
    print ("                   -wind = ", (w), "km/h")
    time.sleep(4.5)
    A = False


  elif choice == "/ch":
    print ("chatbot selected.")
    time.sleep(2)
    print ("-hi, I am a chatbot.")
    time.sleep(2)
    print ("politics, weather, economy, war.")
    chatbot_choice = input("\nplease type the 2 first letters of the subject you want to talk about.\n   ")

    if chatbot_choice == "po":
      print ("politics selected.")
      time.sleep(2)
      input("so, what do you think about our president?    ")
      time.sleep(2)
      input("oh really, why do you think that?    ")
      time.sleep(2)
      input("I personnaly hate our president. \nhe's awful, racist, sexist, and wants to build a wall!? do you want a wall?\n   ")
      time.sleep(2)
      input("I don't want a wall! these poor migrants need somewhere to live don't they? \nI mean, it's not really their fault that where they live is poor or ravaged by war, right?n    ")
      time.sleep(2)
      print ("all right, I have to go now. nice conversation we had, eh? ok, see you!")
      time.sleep(3)
      A = False

    elif chatbot_choice == "we":
      print ("weather selected.")
      time.sleep(2)
      questionW = input("what do you think about the weather, these days, huh?    ")
      print ((questionW), "really??")
      input("I think it's just plain wonderful. \nI mean, just look at outside, it's so beautiful! do you think it will rain tomorrow?\n    ")
      input("I hope not. \nI'm planning on going on a picnic tomorrow. don't you feel it's been getting hotter every year due to global warming?\n   ")
      input("yeah, I think so too.")
      print ("ok, I have to go now, bye!")
      time.sleep(3)
      A = False

    elif chatbot_choice == "ec":
      print ("economy selected")
      time.sleep(2)
      input("don't you think living in NYC is getting more expensive?   ")
      time.sleep(2)
      input("I mean, look at the prices for apartments now! \nthey've gone outrageously high, don't you think so?\n   ")
      input("and all these small buisnesses closing up!?    ")
      input("big companies like amazon and freshdirect and apple and loads of companies like that are crushing these small shops. \nisen't that bad?\n    ")
      input("and also, families with children are getting kicked out of their houses because they can't pay rent as they are not working, and so are not getting any pay. \nthat's terrible!\n    ")
      print ("oh, I should get going, I have  meeting. \nsee you next time (maybe)!\n")
      time.sleep(3)
      A = False 

    elif chatbot_choice == "wa":
      print ("war selected")
      time.sleep(2)
      input("war is such a bad thing, right?    ")
      input("it kills people, and injures others, and so much people die from war.    ")
      input("a world would be perfect without war, don't you think so?    ")
      input("people have been fighting since, well the prehistoric ages, antiquity, the hundred's year war, WW1 and WW2, and lots of many others! \nwhat do you have to say for that, eh?\n   ")
      input("I'm tired of fighting, are you? I just lost my cousin who was fighting in Irak. he was just patrolling a part of a village, and them, BAM, a sniper shot him! \nand the thing is, he has a family, who were depending on him. it's really atrocious!\n    ")
      input("leaders of countries should do something, right?    ")
      input("just standing around doing nothing is not going to help. \nwe all have to do our part!\n    ")
      print ("i have to go now. goodbye, and nice conversation we had!")
      time.sleep(3)
      A = False


  else:
    print ("ERROR!!! please try again")
    time.sleep(3)
    A = False
?