Skip to content

Commit 372369e

Browse files
authored
Create LOTTERY SIMULATION
OUR MAIN INTENTION TO DECREASE THE LOTTERY WITH THIS CODE.IN THIS PROGRAM WE CAME TO KNOW THAT HOW MUCH TIMES WE WILL WIN IN PLAYING LOTTERY AND HOW MUCH WE WILL GET LOSS.AFTER THE PLOTTING GRAPH WE CAME TO KNOW THAT PROBABILITY OF LOSSING IN THE PLAY IS MORE THAN THE WIN IN THE PLAY.
1 parent d99f6d6 commit 372369e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

LOTTERY SIMULATION

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#LOTTERY SIMULATION FOR 1 YEAR MEANS 365 DAYS AND PLOT ITS GRAPH
2+
import random
3+
import matplotlib.pyplot as plt
4+
account=0
5+
x=[]
6+
y=[]
7+
for i in range(365):
8+
x.append(i+1)
9+
bet=random.randint(1,10)
10+
lucky_draw=random.randint(1,10)
11+
#print("Bet",bet)
12+
#print("Lucky draw",lucky_draw)
13+
if bet==lucky_draw:
14+
account=account+900-100
15+
else:
16+
account=account-100
17+
y.append(account)
18+
print("Amount in your gaming account",account)
19+
plt.plot(x,y)
20+
plt.show()

0 commit comments

Comments
 (0)