Skip to content

Instantly share code, notes, and snippets.

@EmmaG2
Last active December 4, 2023 15:56
Show Gist options
  • Save EmmaG2/8a6582dab794af15205974f9302ac48e to your computer and use it in GitHub Desktop.
Save EmmaG2/8a6582dab794af15205974f9302ac48e to your computer and use it in GitHub Desktop.
import random
n_random = random.randint(1, 250)
times = 0
list = []
n = 0
while n != n_random and times < 13:
n = int(input("Ingresa el número: "))
list.append(n)
if n_random < n:
print('El número buscado es menor')
elif n_random > n:
print('El número buscado es mayor')
times = times + 1
if times < 6:
print('Enhorabuena')
elif times > 6 and times <10:
print('Bueno')
elif times > 11 and times < 13:
print('No está mal')
else:
print('Número inválido')
print('Número:', n_random)
print(list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment