Skip to content

workshop jp#8

Open
nullusj wants to merge 2 commits intoCodersLab-CZ:masterfrom
nullusj:master
Open

workshop jp#8
nullusj wants to merge 2 commits intoCodersLab-CZ:masterfrom
nullusj:master

Conversation

@nullusj
Copy link

@nullusj nullusj commented Feb 3, 2024

No description provided.

ai_number = randint(0, 1000)

def mathematics():
return (min_number + max_number) // 2

Choose a reason for hiding this comment

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

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)):

Choose a reason for hiding this comment

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

ufffff

ne. tohle opravdu ne.. takle slozite napsane jsem to jeste nevidel. takle to nemuzes mit

Copy link
Author

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

nepouzivat globalni prommene! to neni vubec potreba

clear()
input(f"Please enter a valid integer.\nPress Enter to continue...")

while True:

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

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):

Choose a reason for hiding this comment

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

opet super komplikovnaa logika.. tohle nejde ani poradne precist co se tam deje.

# global count


def mat_rand(dices, wall):

Choose a reason for hiding this comment

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

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)}")

Choose a reason for hiding this comment

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

ta logika je kazdopadne chybna protoze ti umozni kupr vlozit kostku se sedmi hranama coz neni povolene



except ValueError:
pass

Choose a reason for hiding this comment

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

proc to vlastn echytas kdyz tu vyjimku umlcis?

count = 0

# while not count == 6:
while count < 6:

Choose a reason for hiding this comment

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

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()

Choose a reason for hiding this comment

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

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:

Choose a reason for hiding this comment

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

co je tady ta 8?

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