-
-
Save mastro35/1c4348b7112b704563163fb5014146b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import random | |
def get_winning_numbers(): | |
random.seed() | |
elements = [] | |
for i in range (0,10): | |
time.sleep(1) # let's simulate some kind of delay | |
elements.append(random.randint(1,10)) | |
return elements | |
random.seed() | |
my_number = random.randint(1,10) | |
print ("my number is " + str(my_number)) | |
for winning_number in get_winning_numbers(): | |
print(winning_number) | |
if my_number == winning_number: | |
print ("you win!") | |
break | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment