Last active
December 4, 2023 15:56
-
-
Save EmmaG2/8a6582dab794af15205974f9302ac48e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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