Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!
from string import ascii_letters as letters, digits
from random import sample, shuffle
from time import sleep
import sys
characters = list(letters + digits)
shuffle(characters)
genpass = ''.join(sample(characters, k=5))
print(f'Your generated password is {genpass}')
password = input('Enter password:\n>> ')
if password == genpass:
play = input('Enter p to play\n>> ').lower()
else:
print('Wrong password! Goodbye!')
sys.exit()
if play == 'p':
print('Welcome to my game')
sleep(2)
print('Proffesor Dogwater: Oh hello Alex !(you) Could you help me find this...
Hi there,hello! I searched up what the error means but i still cant fix it. if anyone can help, please tell me
hello! Should I post the whole code?Hi there,
I have a feeling that it may be due to something in your code not being properly indented. Can you post your code so we can see where that may be?
import random
import time
number = random.randint(1,100)
print(number)
list = ["h", "hello", "bro", "mbappe", "fjkrehfehfa", "mat", "oilmanu"]
mypasswordstring = (random.choice(list))
print(mypasswordstring)
mypassword = str(number) + mypasswordstring
print(f"your generated password is: {number}{mypasswordstring}")
typepassword = input("type in your pasword ")
if typepassword == mypassword:
print("right password!")
playgame = input("click P to play adventures of the world")
if playgame == 'P' or playgame == 'p':
print("Welcome to Adventures of the world. in this game you will be adventuring around the globe to find a potion to end all fantasy monsters")
beginning = input("Proffesor Dogwater: Oh hello Alex !(you) Could you help me find this potion? You'll need to travel almost around the whole world though! I'll reward you with 1M dollars if you find it. type Y to accept the mission. Type N to decline the mission.")
if beginning == 'Y' or beginning == 'y':
print("You: Sure! I'll help! Proffesor Dogwater: Oh thank you Alex!")
print("the proffesor gives you a map to find the potion. it says its in a ancient land hidden in caves from reality called Kall Mon")
print("You now depart from the town")
print("30 minutes later...")
time.sleep(2)
option1 = input("you have arrived at a dangerous path featuring a mountain. type 1 to look for another path. type 2 to continue on the dangerous path")
from string import ascii_letters as letters, digits
from random import sample, shuffle
from time import sleep
import sys
characters = list(letters + digits)
shuffle(characters)
genpass = ''.join(sample(characters, k=5))
print(f'Your generated password is {genpass}')
password = input('Enter password:\n>> ')
if password == genpass:
play = input('Enter p to play\n>> ').lower()
else:
print('Wrong password! Goodbye!')
sys.exit()
if play == 'p':
print('Welcome to my game')
sleep(2)
print('Proffesor Dogwater: Oh hello Alex !(you) Could you help me find this potion? You\'ll need to travel almost around the whole world though! I\'ll reward you with 1M dollars if you find it. type Y to accept the mission. Type N to decline the mission.')
else:
print('Goodbye!')
sys.exit()
start = input('>> ').lower()
if start == 'y':
print("You: Sure! I'll help! Proffesor Dogwater: Oh thank you Alex!")
print("the proffesor gives you a map to find the potion. it says its in a ancient land hidden in caves from reality called Kall Mon")
print("You now depart from the town")
print("30 minutes later...")
sleep(2)
else:
print('Goodbye!')
sys.exit()
print("you have arrived at a dangerous path featuring a mountain. type 1 to look for another path. type 2 to continue on the dangerous path")
option = input('>> ').lower()
Code Forum is a community platform where coding enthusiasts can connect with other developers, engage in discussions, ask for help, and share their knowledge with a supportive community. It's a perfect place to improve your coding skills and to find a community of like-minded individuals who share your passion for coding.
We use essential cookies to make this site work, and optional cookies to enhance your experience.