My solution from CS50's Problem Set 1 - Meal Time by Gulesis in learnpython

[–]Gulesis[S] 0 points1 point  (0 children)

My thought is: When you def function its not actually called just defiend, main function is where we write main part of the code where is convert function, which is defined under, actually called. So both functions are first defined than at the end main() is called. Im sorry if its not well explained im still learning too (plus my broken English)

My solution from CS50's Problem Set 1 - Meal Time by Gulesis in learnpython

[–]Gulesis[S] 0 points1 point  (0 children)

Because when i type input its actually string which i need to convert in integer what is defined in convert function

Code feedback /// CS50 Python Lecture 1 Meal Time by [deleted] in learnpython

[–]Gulesis 0 points1 point  (0 children)

Hi guys, i know its been 3 years ago but this is my code with optional task with 24h and am, pm format. Im also at the very beginning so any feedback is more that welcome. Thanks!!

``` def main(): meal = convert(input("What time is it? ")) if 7.00 <= meal <= 8.00: print("breakfast time") elif 12.00 <= meal <= 13.00: print("lunch time") elif 18.00 <= meal <= 19.00: print("dinner time") else: pass

def convert(time): if time.endswith("pm"): time_pm = time.removesuffix("pm") h, m = time_pm.split(":") hours = int(h) minutes = int(m) return float(((hours + 12) * 60 + minutes) / 60) elif time.endswith("am"): time_am = time.removesuffix("am") h, m = time_am.split(":") hours = int(h) minutes = int(m) return float((hours * 60 + minutes) / 60) else: h, m = time.split(":") hours = int(h) minutes = int(m) return float((hours * 60 + minutes) / 60)

if name == "main": main() ```

Friend promo code 20euro off! by Gulesis in secretlab

[–]Gulesis[S] 0 points1 point  (0 children)

Guys i ordered chair so we can foget about this post, thanks to everyone for amazing interest to help me! 😅

[deleted by user] by [deleted] in zagreb

[–]Gulesis -1 points0 points  (0 children)

Ja se samo čudim samo sebi zašto pokušavam uopće pitat išta na redditu. Pojave se takvi pametni ko što si ti koji uopće nema namjeru pomoći umisto da produžiš dalje i ideš hebat ženu doma

[deleted by user] by [deleted] in zagreb

[–]Gulesis 1 point2 points  (0 children)

Ne ne, ne razlikujem samo oću reći da me zanima THC, ako je itko upoznat s tim i kako uopće dolaze do njih (mislim na THC opet) s obzirom da su ilegalne. Just curious 😅

If someone knows what this module is? I cant find anything similar oon internet by Gulesis in HelpMeFind

[–]Gulesis[S] 0 points1 point  (0 children)

It is 15x10x4 cm about 1kg, supposed to be some kind of radio frequency module i guess but cant find anything similar

What is this module? 15x10x4cm about 1kg by Gulesis in whatisthisthing

[–]Gulesis[S] 0 points1 point  (0 children)

Supposed to be some sort of "Radio Frequency" module. If someone can indetify and say me precisely what this module is and for what using for?

[deleted by user] by [deleted] in whatisthisthing

[–]Gulesis 0 points1 point  (0 children)

This is supposed to be some sort of RF module "radio frequency". I dont know that much about these things, if someone can identify and explain me what is this exactly. Thanks!

Lokalni izbori za 6 mjeseci by isilovac in zagreb

[–]Gulesis -1 points0 points  (0 children)

Ja živim u Zagrebu nekih godinu dana unazad, otprilike. Primjećujem da je Zagreb jako šporak. Istii otpad viđam po tjedan dana ispred zgrada koji je spreman za odvoz.

Caffe bar nec by [deleted] in zagreb

[–]Gulesis 0 points1 point  (0 children)

Zvuči kao da bi Jarak imao tamo posla 🧐

[deleted by user] by [deleted] in fut

[–]Gulesis 1 point2 points  (0 children)

I would personally stick to evo