-
Notifications
You must be signed in to change notification settings - Fork 0
/
prediksi_sicbo.py
106 lines (90 loc) · 2.89 KB
/
prediksi_sicbo.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
import numpy as np
import webbrowser as wb
from datetime import datetime
import time
# komponen
def logo ():#logo pertama
print ('\t','-'*26)
print ('\t','-'*26)
print ('\t','| {•••• PREDIKSI ••••} |')
print ('\t','-'*26)
print ('\t','-'*26)
def batasAtas ():#batas atas
print('\t')
print('\t','{','=+×+='*7,'}')
def batasBawah ():#batas bawah
print('\t','{','=+×+='*7,'}')
print('\t')
print('\t')
def waktu (): #info waktu sekarang
e=datetime.now()
print ('\t',"¤[ tanggal/bulan/tahun = %s/%s/%s ]¤" % (e.day, e.month, e.year))
print ('\t',"¤[ jam : menit : detik = %s:%s:%s ]¤" % (e.hour, e.minute, e.second))
print ('\t')
def mundur (waktujeda):#hitungan waktu mundur
while waktujeda:
mins, secs = divmod(waktujeda, 60)
timer = '{:02d}:{:02d}'.format(mins, secs)
print('\t','\t','WAKTU = ','( ',timer,' )', end="\r")
time.sleep(1)
waktujeda -= 1
def alamat () : # akses web
cari = wb.open('https://a567tv.com/fullscreenGame',new=3)
print(cari)
def game_np32():# sicbo numpy 32-bit
data = []
for nomor in range (main) :
# data bahan
a = np.random.randint(1,6,size=3, dtype=np.intc) # random numpy
b = np.sum(a) #hasil random
nomor += 1
data.append(b)
rekap = data[-2:]
besar = ('》.katagori = ( BESAR )')
kecil = ('》.katagori = ( KECIL )')
# mulai program game
logo ()
batasAtas()
print ('\t',' [ PREDIKSI DADU KE ]','\n','\t','\t',f" [ {nomor} ]",'\n')
waktu()
print ('\t','MULAI : ')
print ('\t','~'*40)
print('\t','》.hasilnya adalah = ',a)
print('\t','》.total = ','(',b,')')
if (b <= 10) :
print ('\t',kecil,'\n')
elif (b >= 11):
print ('\t',besar,'\n')
print ('\t','~'*40)
print (' data terahir : ',rekap)
batasBawah()
mundur(waktujeda)
print ('\n')
def tebak () : # prediksi
d= int (input ('hasil = '))
if d<= 10 :
print ('kecil')
elif d>= 11 :
print ('besar')
# memulai_program
print ('~~ selamat datang di prediksi roll dadu sicbo ~~')
print ('_'*49)
main = int (input('●~berapa kali prediksi : '))
waktujeda = int (input('●~jeda waktu : '))
print ('\t','[••• mulai prediksi •••]','\n')
while True :
bermain = input (' [sudah siap] \n (y).mulai / (n).stop (Exit)\n (y/n) : ')
if (bermain == 'y') :
# alamat ()
game_np32 ()
elif (bermain == 'Y') :
#alamat ()
game_np32 ()
elif (bermain == 'n') :
print ('prediksi selesai \n [TERIMAKASIH] ')
exit ()
elif (bermain == 'N') :
print ('prediksi selesai \n [TERIMAKASIH] ')
exit ()
else :
print ('(maaf Pilhan SALAH) \n ulangi lagi :')