Sorry for my English. Each month I go and play in casino, one time a month. My decision criteria: With random module find day and week to play in casino, only one exception, do not accept from random module the last month played week and day. For example, if I went 14th of October the day for November should be any day but not 14th. Here is my code: If I enter the same number “2” for example, the program doesn’t eliminate the number “2” my last month week. Please help.
import random
zz = raw_input ("Please enter the last week number: ")
fx = int(zz)
print fx
week_randoms=[]
gg = week_randoms
for i in range (4):
gg = week_randoms
gg.append(random.randrange(1,5))
print gg
hh = gg[0:1]
if fx != hh:
print "You got your number baby", hh
else: print "Run this program again"
Aucun commentaire:
Enregistrer un commentaire