Last answered:

13 May 2022

Posted on:

07 May 2022


Sample of code to ask the same question

what do you think about this sample of code:

import numpy as np

season = ["summer", "autumn", "winter", "spring"]

i = np.random.randint(0,4)

word = season[i]

guess = input("I'm thnking of a word, can you guess what is ? \n Hint is a season >>>")
guess = guess.lower()

if guess in season:
    if guess == word :
        print("Yes, It's", guess, ".Well done!")
    else :
        print("Non, is not", guess, ".Sorry!")
    print(guess.capitalize(), "is not a season")

1 answers ( 0 marked as helpful)
Posted on:

13 May 2022


Hey Said,

Thank you for your suggestion!

I think your code works exactly as expected, without any errors. Keep up the good work!

Kind regards,
365 Hristina

Submit an answer