-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathb02.py
More file actions
47 lines (36 loc) · 1.09 KB
/
Copy pathb02.py
File metadata and controls
47 lines (36 loc) · 1.09 KB
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
'''
B02 - Kerang Ajaib
Spesifikasi : Permainan kerang ajaib
Coder : 16521316
'''
import time
import f_common as common
def lcgmethod(seed_data):
lastindex = common.iterLength(seed_data)-1
m = int(time.time()) // int(time.time())-999
a = int(time.time()) // int(time.time())-666
c = int(time.time()) // int(time.time())-333
new_seed = (a*seed_data[lastindex] + c) % m
return new_seed
def conch_shell(randomseeddata):
randomseeddata += [lcgmethod(randomseeddata)]
lastindex = common.iterLength(randomseeddata)-1
outputoption = randomseeddata[lastindex] % 8
q = input('Apa pertanyaanmu? ')
if outputoption == 0:
print('Bisa Jadi.')
elif outputoption == 1:
print('Tidak tau.')
elif outputoption == 2:
print('Mungkin.')
elif outputoption == 3:
print('Tidak mungkin.')
elif outputoption == 4:
print('Tentu saja iya.')
elif outputoption == 5:
print('Tentu saja tidak.')
elif outputoption == 6:
print('Iya.')
elif outputoption == 7:
print('Tidak.')
return randomseeddata