« first day (854 days earlier)      last day (2512 days later) » 

3:40 PM
i have this code: def pin():
r1 = random.randint(1, 9)
r2 = random.randint(1, 9)
r3 = random.randint(1, 9)
r4 = random.randint(1, 9)

securepin = "{}{}{}{}".format(r1, r2, r3, r4)
return int(securepin)


def getpin():
securepin = pin()
with open('pin.txt', 'w') as f:
f.write('%d' % securepin)

def counter():
count = 60
while count != 0:
print(count, " seconds")
count = count - 1
time.sleep(1)
os.system('cls')
if count == 0:
count = 60

getpin()
counter()

while True:
counter()
getpin()
time.sleep(60) THe first getpin() does work but the second one doesnt chance the number in the file does a
 
1 message moved from Python
 

« first day (854 days earlier)      last day (2512 days later) »