Skip to content

hadaci hra cislo#3

Open
Libbaka wants to merge 9 commits intoCodersLab-CZ:masterfrom
Libbaka:libka
Open

hadaci hra cislo#3
Libbaka wants to merge 9 commits intoCodersLab-CZ:masterfrom
Libbaka:libka

Conversation

@Libbaka
Copy link

@Libbaka Libbaka commented Jan 30, 2024

No description provided.

while True:
tip = input("Guess the number: ")

if not tip.isdigit():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ne takle ne, ty to mas udelat pres exception

while True:
cislo = input("Your number (1-49): ")

if not cislo.isdigit():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stejne jako nahore

vybrane_cisla = []
for _ in range(6):
cislo = zadej_cislo()
while cislo in vybrane_cisla:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uff.. tady mas dvojity loop. toto urcite neni spravna logika

vylosovana_cisla.sort()
print(f"Vylosovaná čísla: {vylosovana_cisla}")

shodna_cisla = set(vybrane_cisla) & set(vylosovana_cisla)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty z toho delas sety, to ma byt spis opacne ze do setu ukaldas..

@@ -0,0 +1,41 @@
import random

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cely tenhle kod se mi zda opravdu velmi komplikovany. zkus si to rozdelit do funkci 1] to co vybere user 2] to co vybere pocitac 3] main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants