0
I wanted to make the randint call a random number, save the value of that number, open a question to the user and if; the user’s answer is equal to the number, say that he hit, if different, say he missed. However, in the code I did is always saying it’s wrong. follow the code
def adivinharnumero():
  from random import randint
  numeroaleatorio=randint(0,1)
  print(numeroaleatorio)
  resposta=input("Adivinhe o valor aleatório")
  print(resposta)
  print(numeroaleatorio)
  if resposta==numeroaleatorio:
    print("parabéns, você acertou!!!")
  if resposta!=numeroaleatorio:
    print("você errou")
adivinharnumero()
Valew man! You’re a beast!!!!!
– Pedro Henrique