implemetace smyčky

This commit is contained in:
2026-06-16 21:05:28 +02:00
parent 2cba7cd058
commit 0c6f99f841
+15 -3
View File
@@ -1,4 +1,5 @@
from random import randint
from os import system, name
def throw(count):
count = int(count)
@@ -17,12 +18,23 @@ def show_throw(throw):
pretty_list += f"{i} "
return pretty_list
def clear():
if name == 'nt':
_ = system('cls')
else:
_ = system('clear')
def game():
new_throw = throw(6)
clear()
print(show_throw(new_throw))
input("Prosím, stiskněte enter pro další hod:")
game()
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))
game()
if __name__ == "__main__":
main()