Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Untitled Diff
Created
4 years ago
Diff never expires
Clear
Export
Share
Explain
15 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
48 lines
Copy
10 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
46 lines
Copy
Copy
Copied
Copy
Copied
#
j
aka to liczba nowa
edycja
#
J
aka to liczba nowa
próba
import random
import random
def powitanie():
def powitanie():
print(
print(
"""
"""
Copy
Copied
Copy
Copied
Wita
m
w
grze
'Jaka to liczba'
Wita
j
w
programie
'Jaka to liczba'
Twoim zadaniem jest odgadnięcie liczby
wylosowanej przez komputer
""")
""")
def yes_or_no(question):
def yes_or_no(question):
response = None
response = None
Copy
Copied
Copy
Copied
while response not in
("t", "n"
):
while response not in
('t', 'n'
):
respon
s
e = input(question).lower()
respon
e = input(question).lower()
return response
return response
Copy
Copied
Copy
Copied
def ask_number(question, low, high):
def ask_number(question, low, high):
response = None
response = None
while response not in range(low, high):
while response not in range(low, high):
response = int(input(question))
response = int(input(question))
return response
return response
def main():
def main():
powitanie()
powitanie()
yes_or_no("Czy jesteś gotowy?")
yes_or_no("Czy jesteś gotowy?")
guess = ask_number("Podaj liczbę: ", 1, 100)
guess = ask_number("Podaj liczbę: ", 1, 100)
tries = 10
tries = 10
number = random.randint(1, 100)
number = random.randint(1, 100)
while guess != number:
while guess != number:
Copy
Copied
Copy
Copied
if tries
=
= 0:
if tries
<
= 0:
break
break
if guess < number:
if guess < number:
print("Za mała...")
print("Za mała...")
elif guess > number:
elif guess > number:
print("Za duża...")
print("Za duża...")
else:
else:
print("Zgadłeś!")
print("Zgadłeś!")
guess = ask_number("Podaj liczbę: ", 1, 100)
guess = ask_number("Podaj liczbę: ", 1, 100)
tries -= 1
tries -= 1
Copy
Copied
Copy
Copied
if guess == number:
if guess == number:
Copy
Copied
Copy
Copied
print("Zgadłeś
.
Chodziło mi o liczbę: ", guess)
print("Zgadłeś
!
Chodziło mi o liczbę: ", guess)
elif tries
=
= 0:
elif tries
<
= 0:
print("
Wyczerpałeś wszystkie
próby!")
print("
Skończyły ci się
próby!")
main()
main()
Copy
Copied
Copy
Copied
input("\n\nAby zakończyć
program
naciśnij enter.")
input("\n\nAby zakończyć
naciśnij enter.")
Saved diffs
Original text
Open file
# jaka to liczba nowa edycja import random def powitanie(): print( """ Witam w grze 'Jaka to liczba' Twoim zadaniem jest odgadnięcie liczby wylosowanej przez komputer """) def yes_or_no(question): response = None while response not in("t", "n"): response = input(question).lower() return response def ask_number(question, low, high): response = None while response not in range(low, high): response = int(input(question)) return response def main(): powitanie() yes_or_no("Czy jesteś gotowy?") guess = ask_number("Podaj liczbę: ", 1, 100) tries = 10 number = random.randint(1, 100) while guess != number: if tries == 0: break if guess < number: print("Za mała...") elif guess > number: print("Za duża...") else: print("Zgadłeś!") guess = ask_number("Podaj liczbę: ", 1, 100) tries -= 1 if guess == number: print("Zgadłeś. Chodziło mi o liczbę: ", guess) elif tries == 0: print("Wyczerpałeś wszystkie próby!") main() input("\n\nAby zakończyć program naciśnij enter.")
Changed text
Open file
# Jaka to liczba nowa próba import random def powitanie(): print( """ Witaj w programie 'Jaka to liczba' """) def yes_or_no(question): response = None while response not in ('t', 'n'): respone = input(question).lower() return response def ask_number(question, low, high): response = None while response not in range(low, high): response = int(input(question)) return response def main(): powitanie() yes_or_no("Czy jesteś gotowy?") guess = ask_number("Podaj liczbę: ", 1, 100) tries = 10 number = random.randint(1, 100) while guess != number: if tries <= 0: break if guess < number: print("Za mała...") elif guess > number: print("Za duża...") else: print("Zgadłeś!") guess = ask_number("Podaj liczbę: ", 1, 100) tries -= 1 if guess == number: print("Zgadłeś! Chodziło mi o liczbę: ", guess) elif tries <= 0: print("Skończyły ci się próby!") main() input("\n\nAby zakończyć naciśnij enter.")
Find difference