diff --git a/1] guessing game/Hadaci hra cislo.py b/1] guessing game/Hadaci hra cislo.py
new file mode 100644
index 0000000..7c924cb
--- /dev/null
+++ b/1] guessing game/Hadaci hra cislo.py
@@ -0,0 +1,21 @@
+import random
+def guess_the_number():
+ secret_number = random.randint(1, 100)
+
+ while True:
+ try:
+ user_guess = int(input("Hádej číslo: "))
+
+ if user_guess < secret_number:
+ print("Příliš malé!")
+ elif user_guess > secret_number:
+ print("Příliš velké!")
+ else:
+ print("Vyhráváte!")
+ break
+
+ except ValueError:
+ print("Není to číslo!")
+
+if __name__ == "__main__":
+ guess_the_number()
diff --git a/1] guessing game/hadaci hra cislo/.idea/.gitignore b/1] guessing game/hadaci hra cislo/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/1] guessing game/hadaci hra cislo/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/1] guessing game/hadaci hra cislo/.idea/hadaci hra cislo.iml b/1] guessing game/hadaci hra cislo/.idea/hadaci hra cislo.iml
new file mode 100644
index 0000000..d0876a7
--- /dev/null
+++ b/1] guessing game/hadaci hra cislo/.idea/hadaci hra cislo.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/1] guessing game/hadaci hra cislo/.idea/inspectionProfiles/profiles_settings.xml b/1] guessing game/hadaci hra cislo/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/1] guessing game/hadaci hra cislo/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/1] guessing game/hadaci hra cislo/.idea/misc.xml b/1] guessing game/hadaci hra cislo/.idea/misc.xml
new file mode 100644
index 0000000..a0f56f8
--- /dev/null
+++ b/1] guessing game/hadaci hra cislo/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/1] guessing game/hadaci hra cislo/.idea/modules.xml b/1] guessing game/hadaci hra cislo/.idea/modules.xml
new file mode 100644
index 0000000..683d844
--- /dev/null
+++ b/1] guessing game/hadaci hra cislo/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/1] guessing game/hadaci hra cislo/.idea/vcs.xml b/1] guessing game/hadaci hra cislo/.idea/vcs.xml
new file mode 100644
index 0000000..b2bdec2
--- /dev/null
+++ b/1] guessing game/hadaci hra cislo/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/1] guessing game/hadaci hra cislo/Hadaci hra cislo.py b/1] guessing game/hadaci hra cislo/Hadaci hra cislo.py
new file mode 100644
index 0000000..6666461
--- /dev/null
+++ b/1] guessing game/hadaci hra cislo/Hadaci hra cislo.py
@@ -0,0 +1,24 @@
+import random
+
+def hra_hadani_cisel():
+ vylosovane_cislo = random.randint(1, 100)
+
+ while True:
+ tip = input("Guess the number: ")
+
+ if not tip.isdigit():
+ print("It's not a number!")
+ continue
+
+ tip = int(tip)
+
+ if tip < vylosovane_cislo:
+ print("Too small!")
+ elif tip > vylosovane_cislo:
+ print("Too big!")
+ else:
+ print("You win!")
+ break
+
+if __name__ == "__main__":
+ hra_hadani_cisel()
diff --git a/2] loto/hra lotto.py b/2] loto/hra lotto.py
new file mode 100644
index 0000000..5b9c93c
--- /dev/null
+++ b/2] loto/hra lotto.py
@@ -0,0 +1,41 @@
+import random
+def zadej_cislo():
+ while True:
+ cislo = input("Your number (1-49): ")
+
+ if not cislo.isdigit():
+ print("It's not a number!")
+ continue
+
+ cislo = int(cislo)
+
+ if cislo < 1 or cislo > 49:
+ print("Number must be in range 1-49.")
+ continue
+
+ return cislo
+
+def hra_lotto():
+ vybrane_cisla = []
+ for _ in range(6):
+ cislo = zadej_cislo()
+ while cislo in vybrane_cisla:
+ print("This number is already chosen. Try another.")
+ cislo = zadej_cislo()
+ vybrane_cisla.append(cislo)
+
+ vybrane_cisla.sort()
+ print(f"Vybraná čísla: {vybrane_cisla}")
+
+ vylosovana_cisla = random.sample(range(1, 50), 6)
+ vylosovana_cisla.sort()
+ print(f"Vylosovaná čísla: {vylosovana_cisla}")
+
+ shodna_cisla = set(vybrane_cisla) & set(vylosovana_cisla)
+
+ print(f"Počet shodných čísel: {len(shodna_cisla)}")
+ print(f"Shodná čísla: {shodna_cisla}")
+
+
+if __name__ == "__main__":
+ hra_lotto()
\ No newline at end of file
diff --git a/2] loto/lottohra.py b/2] loto/lottohra.py
new file mode 100644
index 0000000..329488a
--- /dev/null
+++ b/2] loto/lottohra.py
@@ -0,0 +1,25 @@
+import random
+def lotto_game():
+ user_numbers = set()
+
+ while len(user_numbers) < 6:
+ try:
+ user_input = int(input("Zadejte číslo (1-49): "))
+ if 1 <= user_input <= 49 and user_input not in user_numbers:
+ user_numbers.add(user_input)
+ else:
+ print("Neplatný vstup, zadejte platné číslo v rozsahu 1-49.")
+ except ValueError:
+ print("Neplatný vstup, zadejte platné číslo v rozsahu 1-49.")
+
+ sorted_user_numbers = sorted(user_numbers)
+ print("Vaše vybraná čísla:", sorted_user_numbers)
+
+ drawn_numbers = set(random.sample(range(1, 50), 6))
+ print("Vylosovaná čísla:", drawn_numbers)
+
+ matched_numbers = set(sorted_user_numbers).intersection(drawn_numbers)
+ print("Počet shodných čísel:", len(matched_numbers))
+
+if __name__ == "__main__":
+ lotto_game()
diff --git a/3] guessing game 2/.idea/.gitignore b/3] guessing game 2/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/3] guessing game 2/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/3] guessing game 2/.idea/3] guessing game 2.iml b/3] guessing game 2/.idea/3] guessing game 2.iml
new file mode 100644
index 0000000..d0876a7
--- /dev/null
+++ b/3] guessing game 2/.idea/3] guessing game 2.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3] guessing game 2/.idea/inspectionProfiles/profiles_settings.xml b/3] guessing game 2/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/3] guessing game 2/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3] guessing game 2/.idea/misc.xml b/3] guessing game 2/.idea/misc.xml
new file mode 100644
index 0000000..dc9ea49
--- /dev/null
+++ b/3] guessing game 2/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/3] guessing game 2/.idea/modules.xml b/3] guessing game 2/.idea/modules.xml
new file mode 100644
index 0000000..934c3b2
--- /dev/null
+++ b/3] guessing game 2/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3] guessing game 2/.idea/vcs.xml b/3] guessing game 2/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/3] guessing game 2/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3] guessing game 2/Guess game 2.py b/3] guessing game 2/Guess game 2.py
new file mode 100644
index 0000000..e014c70
--- /dev/null
+++ b/3] guessing game 2/Guess game 2.py
@@ -0,0 +1,29 @@
+import random
+
+def guessing_number2():
+ print("Myslim na cislo mezi 1 a 1000.")
+ nejnizsi = 1
+ nejvyssi = 1000
+ pokusy = 10
+
+ for i in range(pokusy):
+ hadane_cislo = random.randint(nejnizsi, nejvyssi)
+ print(f"Pocitac hada: {hadane_cislo}")
+
+ odpoved = input("Cislo je prilis male (m), prilis velke (v) nebo vyhravate (s): ")
+
+ if odpoved == "m":
+ nejnizsi = hadane_cislo + 1
+ elif odpoved == "v":
+ nejvyssi = hadane_cislo - 1
+ elif odpoved == "s":
+ print("Pocitac vyhral!")
+ break
+ else:
+ print("Neplatna odpoved. Zadejte 'm' pro prilis male, 'v' pro prilis velke nebo 's' pro vyhravate.")
+
+ else:
+ print("Maximalni pocet pokusu. Vyhravate!")
+
+if __name__ == "__main__":
+ guessing_number2()
\ No newline at end of file
diff --git a/4] guessing game 3/skuska.py b/4] guessing game 3/skuska.py
new file mode 100644
index 0000000..f138c08
--- /dev/null
+++ b/4] guessing game 3/skuska.py
@@ -0,0 +1,85 @@
+from flask import Flask, request
+
+app = Flask(__name__)
+
+HTML_START = """
+
+
+
+
+ Hadejte cislo
+
+
+Myslete na cislo mezi 1 a 1000
+Nerikejte vase cislo ;)
+
+
+
+"""
+
+
+HTML = """
+
+
+
+
+ Hadejte cislo
+
+
+Je vase cislo {guess}?
+
+
+
+"""
+
+
+HTML_WIN = """
+
+
+
+ Hadejte cislo
+
+
+Huraaa! Uhodl jsem! Vase cislo je {guess}
+
+
+
+"""
+
+
+@app.route("/", methods=["GET", "POST"])
+def hadejte_cislo():
+ if request.method == "GET":
+ return HTML_START.format(0, 1001)
+ else:
+ min_number = int(request.form.get("min"))
+ max_number = int(request.form.get("max"))
+ user_answer = request.form.get("user_answer")
+ guess = int(request.form.get("guess", 500))
+
+ if user_answer == "prilis velke":
+ max_number = guess
+ elif user_answer == "prilis male":
+ min_number = guess
+ elif user_answer == "vyhral/a jste":
+ return HTML_WIN.format(guess=guess)
+
+ guess = (max_number - min_number) // 2 + min_number
+
+ return HTML.format(guess=guess, min=min_number, max=max_number)
+
+
+if __name__ == '__main__':
+ app.run()
\ No newline at end of file