-
Notifications
You must be signed in to change notification settings - Fork 27
Elso hazi #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Elso hazi #18
Conversation
basic/list1.py
Outdated
else: | ||
continue | ||
return(final_list) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool solution, tho I'd rather use a key function, for clarity
basic/list2.py
Outdated
set_nums = set(nums) | ||
final_list= [] | ||
for element in set_nums: | ||
final_list.append(element) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a tesztek erre nem ternek ki, de mit gondolsz jo megoldast kapnal [1,2,3,4,2,1] listara?
basic/list2.py
Outdated
return | ||
new_list = list1 + list2 | ||
new_list.sort() | ||
return(new_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a lista amivel visszatersz ugyan jo. de az ido amig visszatersz vele nem linearis (Timsort->nlogn). Ne feledd hogy a ket kiindulasi lista mar rendezett.
if count >= 10: | ||
return('Number of donuts: many') | ||
else: | ||
return(f'Number of donuts: {count}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ez milyen nyelven van? :) - Pythonban syntax errornak tunik. Mielott elkuldod a megoldasod, kerlek bizonyosodj meg rola, hogy a teszteken atmegy (mindegyik OK eredmennyel fut)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bocs, most latom hogy egy uj featuret hasznalsz. Meno 👍
basic/list1.py
Outdated
final_list.append(element) | ||
else: | ||
continue | ||
return(final_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nem rossz, de klasszabb lenne egy key= fuggvennyel
https://wiki.python.org/moin/HowTo/Sorting
basic/list2.py
Outdated
for element in set_nums: | ||
final_list.append(element) | ||
|
||
return(final_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ez kicsit furcsa lett. Mit gondolsz helyes eredmenyt adna [1,2,1] listara?
No description provided.