-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbkp-check
More file actions
77 lines (63 loc) · 1.34 KB
/
bkp-check
File metadata and controls
77 lines (63 loc) · 1.34 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
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
#!/usr/bin/python
import commands
import random
a1 = commands.getoutput('d1')
a2 = commands.getoutput('d2')
a3 = commands.getoutput('d3')
a4 = commands.getoutput('d4')
a5 = commands.getoutput('d5')
a6 = commands.getoutput('d6')
list1 = [a1,a2,a3,a4,a5,a6]
list2 = [a1,a2,a3,a4,a5,a6]
list3 = [a1,a2,a3,a4,a5,a6]
list4 = [a1,a2,a3,a4,a5,a6]
list5 = [a1,a2,a3,a4,a5,a6]
list6 = [a1,a2,a3,a4,a5,a6]
random.seed()
dce1 = random.choice(list1)
dce2 = random.choice(list2)
dce3 = random.choice(list3)
dce4 = random.choice(list4)
dce5 = random.choice(list5)
dce6 = random.choice(list6)
print dce1, " ", dce2, " ", dce3, " ", dce4, " ", dce5, " ", dce6
if dce1 == a1:
D1 = 100
elif dce1 == a5:
D1 = 50
else:
D1 = 0
if dce2 == a1:
D2 = 100
elif dce2 == a5:
D2 = 50
else:
D2 = 0
if dce3 == a1:
D3 = 100
elif dce3 == a5:
D3 = 50
else:
D3 = 0
if dce4 == a1:
D4 = 100
elif dce4 == a5:
D4 = 50
else:
D4 = 0
if dce5 == a1:
D5 = 100
elif dce5 == a5:
D5 = 50
else:
D5 = 0
if dce6 == a1:
D6 = 100
elif dce6 == a5:
D6 = 50
else:
D6 = 0
if dce1 == dce2 and dce3 or dce2 and dce4 or dce2 and dce5 or dce2 and dce6 or dce3 and dce4 or dce3 and dce5 or dce3 and dce6 or dce4 and dce5 or dce4 and dce6 or dce5 and dce6:
print D1, " ", D2, " ", D3, " ", D4, " ", D5, " ", D6
TOTAL = D1 + D2 + D3 + D4 + D5 + D6
print 'your total is', TOTAL