-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Description
I AM A BEGINNER TO PYTHON AND THIS IS MY FIRST CODE IN PYTHON AFTER HEARING SO MANY TUTORIAL VIDEOS FROM YOUTUBE.https://youtu.be/kqtD5dpn9C8
import sys
import time
secret_code = "2468" # change your secret code here
attempts = 0
max_attempts = 3
while attempts < max_attempts:
entered = input("Enter the secret code: ")
if entered == secret_code:
print("Access Granted! ✅🔰🈯️🔰✅🔰")
sys.exit() # stop program completely
else:
print("Incorrect")
attempts += 1
if attempts == 2:
print("Hint: It's an even number sequence.")
# First lock: 1 minute
print("⚠️🚫⚠️🚫⚠️🚫⚠️ Access Locked for 1 minute!")
time.sleep(60)
# One try after 1 minute
entered = input("Try again after 1 min (Hint: It's an even number sequence): ")
if entered == secret_code:
print("Access Granted! ✅🔰✅🔰")
sys.exit()
else:
print("Incorrect again!")
print("⚠️🚫⚠️🚫⚠️🚫⚠️ Access Locked for 5 minutes!")
time.sleep(300) # 5 minutes lock
# Last try after 5 minutes
entered = input("Final try after 5 min (Hint: It's an even number sequence): ")
if entered == secret_code:
print("Access Granted! ✅🔰✅🔰")
else:
print("⚠️🚫⚠️🚫⚠️🚫⚠️ ACCESS PERMANENTLY LOCKED!")
sys.exit()
AND GUYS I AM NOT THAT PRO SO IF ANY PROBLEMS PLS DM ME
AND I DON'T KNOW SHOULD WE POST OUR PROJECT HERE
mohamedarshan786-hub
Metadata
Metadata
Assignees
Labels
No labels