Conversation
| ai_number = randint(0, 1000) | ||
|
|
||
| def mathematics(): | ||
| return (min_number + max_number) // 2 |
There was a problem hiding this comment.
tohle bych teda do funkce nedaval
| if user_answer not in [1, 2, 3]: | ||
| input(f"Please enter 1, 2, or 3.\nPress Enter to continue...") | ||
|
|
||
| if (ai_number > user_number and user_answer == 1) or (ai_number < user_number and user_answer == 2) or ((ai_number != user_number) and user_answer == 3) or (ai_number == user_number and (user_answer == 1 or user_answer == 2)): |
There was a problem hiding this comment.
ufffff
ne. tohle opravdu ne.. takle slozite napsane jsem to jeste nevidel. takle to nemuzes mit
There was a problem hiding this comment.
Mne je z toho taky blujno ale ve 2 rano jsem se na tomhle nejak zasekl a jine reseni mne nenapadlo ..... a do GPT at to zjednoduzsi to davat nechci ...vratim se k tomu a zkusim to jinak
| return (min_number + max_number) // 2 | ||
|
|
||
| def compare(ai_number, user_answer): | ||
| global min_number, max_number |
There was a problem hiding this comment.
nepouzivat globalni prommene! to neni vubec potreba
| clear() | ||
| input(f"Please enter a valid integer.\nPress Enter to continue...") | ||
|
|
||
| while True: |
There was a problem hiding this comment.
velmi velmi velmi komplikovana logika. vubec nevim co se deje. ten algoritmus je pomerne primocary - je to klasicky binary search
| @@ -0,0 +1,84 @@ | |||
| from flask import Flask, render_template | |||
There was a problem hiding this comment.
tady pro to plati v podstate to same co nahore - je to super komplikovane a neni to spravne
| return dots | ||
|
|
||
|
|
||
| def dic_decode(parse_dice): |
There was a problem hiding this comment.
opet super komplikovnaa logika.. tohle nejde ani poradne precist co se tam deje.
| # global count | ||
|
|
||
|
|
||
| def mat_rand(dices, wall): |
There was a problem hiding this comment.
tohle je tady na co. to dela tahle funkce? nejak to nechapu
|
|
||
|
|
||
| dice_parameter = input("Typ of dice:") | ||
| print(f"RESULT={dic_decode(dice_parameter)}") |
There was a problem hiding this comment.
ta logika je kazdopadne chybna protoze ti umozni kupr vlozit kostku se sedmi hranama coz neni povolene
|
|
||
|
|
||
| except ValueError: | ||
| pass |
There was a problem hiding this comment.
proc to vlastn echytas kdyz tu vyjimku umlcis?
| count = 0 | ||
|
|
||
| # while not count == 6: | ||
| while count < 6: |
There was a problem hiding this comment.
opet je to velmi komplikvane ta logika. vzdyt jenom vybiras par cisel.. to nemusi a nema byt takhle prekomplikvane
| if 1 <= select <= 49: | ||
| if select not in select_numbers: | ||
| select_numbers.append(fortune.pop(select - 1)) | ||
| select_numbers.sort() |
There was a problem hiding this comment.
v kazde iteraci sortujes - to neni potreba. sort se muze udelat jednou a na konci
| if select not in select_numbers: | ||
| select_numbers.append(fortune.pop(select - 1)) | ||
| select_numbers.sort() | ||
| if (select - 1) >= 8: |
No description provided.