Skip to content

Instantly share code, notes, and snippets.

@soyHouston256
Created October 29, 2020 13:40
Show Gist options
  • Save soyHouston256/229890a1747e6f81e702a5bfcc2189bf to your computer and use it in GitHub Desktop.
Save soyHouston256/229890a1747e6f81e702a5bfcc2189bf to your computer and use it in GitHub Desktop.
import random
def run():
numero = random.randint(1,10)
numero_pensado = int(input("Que numero penso la PC: "))
while numero != numero_pensado:
if numero_pensado < numero:
numero_pensado = int(input("Buscar un numero mas grande: "))
else:
numero_pensado = int(input("Buscar un numero mas peque: "))
print("Así es campeon el numero que penso la pc es: " + str(numero_pensado))
if __name__ == "__main__":
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment