první hod

This commit is contained in:
2026-06-16 20:55:30 +02:00
parent 3ddf97676a
commit 7d68d70bd6
+29
View File
@@ -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()