Skip to content

Commit

Permalink
While loop fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdelahe53 committed Sep 9, 2024
1 parent 278b556 commit ea1b2c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lucky number.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import random # Import the "random" library

print("If you get lucky 13 on the first try, you are the luckiest person!") # Print a message
user = input("Tap Enter...")

lucky_num = 13
user = 0

while True:
while user < lucky_num:
random_number = random.randint(1, 100) # Generate a random number between 1 and 100
print("Your number is:", random_number) # Display the random number

Expand Down

0 comments on commit ea1b2c9

Please sign in to comment.