Python Game
Using my knowledge of python to create basic word guessing game
def word_hint(hint):
print("Can you guess the word?")
print("Hint:" + hint)
msg = input()
return msg
print("Welcome to the word guessing game called 'Can You Guess the Word?'!")
print("Press enter to continue:"+"\n")
input()
rsp = word_hint("It starts with the letter p and is a common language used in coding.")
if rsp == "python":
print ("Correct! Nicely done!")
else:
print("Wrong! The answer we were looking for was 'python'.")
print("On to the next word..."+"\n")
rsp = word_hint("The word starts with a p and is very common function used in python.")
if rsp == "print":
print("Wow! Amazing! Great answer!")
else:
print("Oh no! That was wrong! The answer we were looking for was 'print'.")
print("This next word will be the last one! Finish strong!"+"\n")
rsp = word_hint("A common greeting that starts with an H and ends with an O.")
if rsp == "hello":
print("That is right! Great job!")
else:
print("That was wrong! You can do better than that!")
print("Thank you for playing Can You Guess the Word! We will catch you on the flippity-flip!")