Wpis z mikrobloga

Mirki napisałem swój program w #python może komuś się przyda!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

import random

print("\nMam na myśli pewną liczbę z zakresu od 1 do 50.")

# losuj
thenumber = random.randint(1, 50)
guess = int(input("Myślę, że jest to: "))
tries = 1

while guess != the
number:
if guess > thenumber:
print("Za dużo...")
else:
print("Za mało...")

guess = int(input("Myślę, że jest to: "))
tries += 1

print("Brawo! Ta liczba to", the
number)
print("Do odgadnięcie liczby potrzebowałeś tylko", tries, "prób!\n")

input("\n\nNaciśnij Enter aby zakończyć.")

#programowanie #chwalesie
  • 9
  • Odpowiedz