From 7d68d70bd64c03923e436f3a0b58cd6d28329bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sp=C3=A1=C4=8Dil?= Date: Tue, 16 Jun 2026 20:55:30 +0200 Subject: [PATCH] =?UTF-8?q?prvn=C3=AD=20hod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..6587a9f --- /dev/null +++ b/main.py @@ -0,0 +1,29 @@ +from typing import Concatenate as concat +from random import randint + +def throw(count): + count = int(count) + new_throw = [] + for dice in range(count): + new_throw.append(str(randint(1, 6))) + return new_throw + +def show_throw(throw): + pretty_list = ", ".join(throw) + pretty_list += "\n" + for i in range(1, len(throw) + 1): + pretty_list += "^ " + pretty_list += "\n" + for i in range(1, len(throw) + 1): + pretty_list += f"{i} " + return pretty_list + +def main(): + print("Vítejte ve hře v kostky!") + input("Prosím, stiskněte enter pro první hod:") + new_throw = throw(6) + print(show_throw(new_throw)) + + +if __name__ == "__main__": + main()