I'm trying to make a hangman-style game, and it works, for the most part...I just can't get the word to find the first character in it(for instance, if the word is like "hello" and I typed in "h" it wouldn't work, but if I typed in any other character, it would)
Here's my code:
import os
def clear():
os.system("clear")
def chooseWord():
return input("Player 1, please choose a word: ")
def guessWord():
return input("Player 2, please guess a character: ")
word = chooseWord().lower()
characters = len(word)
clear()
print(f"The word has {characters} characters!")
chances = 3
print(word)
guessedCorrectly = guessWord().lower()
if word.find(guessedCorrectly):
print("Hi")
else:
print("hi")