Skip to content

snad je to dobře#11

Open
MatejKrivon wants to merge 1 commit intoCodersLab-CZ:masterfrom
MatejKrivon:master
Open

snad je to dobře#11
MatejKrivon wants to merge 1 commit intoCodersLab-CZ:masterfrom
MatejKrivon:master

Conversation

@MatejKrivon
Copy link

No description provided.

def get_user_numbers():
user_numbers = set()
while len(user_numbers) < 6:
try:

Choose a reason for hiding this comment

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

ten try muze byt klidne mensim podobe jako to mas v tom prvnim prikladu. Neni to chyba ale je to lepsi

try:
user_input = input("Enter a number (1-49): ")
number = int(user_input)
if number < 1 or number > 49:

Choose a reason for hiding this comment

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

not 1 <= number <=49

@@ -0,0 +1,36 @@
def computer_guess():
Copy link

@ExperimentalHypothesis ExperimentalHypothesis Feb 6, 2024

Choose a reason for hiding this comment

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

celkem zajimave reseni ktere asi funguje. Jen je pro mne trochu matouci jak to guess inicialiuzujes dvakrat, jednou pred tim while a pak uvnitr.

pak taky ta logika logika pricitani a odcitani tech attemps kdyz ho prictes ale kdyz to byl spatny feedback tak ho hned zas odectes v te else vetvi - trochu komplikovane a urcte by se to dalo jeste trochu poladit, ale celkove zatim asi jedno z nejlepsich reseni

Good job

:return: dice roll value for proper dice pattern, `Wrong Input` text elsewhere

"""

Choose a reason for hiding this comment

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

tohle mas nejak divne naformatovane na to bacha. to skoro vypada jak kdyz si to odnekud zkopiroval a cely se ti to rozjelo. dost blbe se to mi to cte, tak to kdyztak pushni znovu s poradnym formtovanim



def compare_numbers(user_numbers, lotto_numbers):
return len(set(user_numbers).intersection(set(lotto_numbers)))

Choose a reason for hiding this comment

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

tohle mi prijde nevhodne predelavat to tady na set abys mohl udelat intersetcion. Mnohem lepsi by bylo kdyzby ty funkce co ty data pripravuji uz set vratily

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