#Looking for help for hangman game

24 messages · Page 1 of 1 (latest)

alpine gate
#

Post code and explain why you're stuck 🙂

charred flame
#
    while True:
        guess = input("Next guess:").upper()
        if guess in guessed_letters:
            print("You already tried this!")
        elif guess in word:
           print("You are correct")
           guessed_letter += letter

def guessed_letter(word):
    if letter = not_guessed




def display_word(word,guessed_letters):
    display = "" * len(word)



def choose_random_battle():
#

I cant get display = "" * len(word) to work

alpine gate
#

Well

#

An empty string times a number is still an empty string?

charred flame
#

Well true

#

but otherwise it comes back as an error

alpine gate
#

Why?

charred flame
#

im not sure

alpine gate
#

If you just put an underscore in instead of that empty string that'll work out

charred flame
#

no it doesnt tried both variants

#

if I put * it kinda goes through but nothing happens

#

display = "_" len(word)

#

e.g

#

comes back as invalid syntax

alpine gate
#

Where is the star?

#

lol

#

The star is the multiplication operator

charred flame
#

I done it it kinda works but not in the way i want it to

alpine gate
#

Why?

charred flame
#

Because it doesnt recognise the letter i input

#

it recognises blank statement instead

charred flame
#

I messed it up again

#

it no longer recognises even blank statement it simply prints none existend messages