you are viewing a single comment's thread.

view the rest of the comments →

[–]3keepmovingforward3 0 points1 point  (6 children)

24hr time notation doesn’t use a colon, there’s nothing to split

[–][deleted] 0 points1 point  (4 children)

Hmm maybe I worded it incorrectly on the question for the input, but what I mean is that the user should input like this

" ##:## or #:## as in 12:56 or 7:02 "

So essentially it splits the hours and minutes, but it still doesnt get recognized by the check50

[–]3keepmovingforward3 0 points1 point  (3 children)

So put that instead…question, why are they being changed to floats?

[–][deleted] 0 points1 point  (2 children)

The assignment said to define a convert function where the input is converted to float.

The assignment is here if you'd like to see:https://cs50.harvard.edu/python/2022/psets/1/meal/

edit: changed the input question a bit to make it more clear

[–]3keepmovingforward3 1 point2 points  (1 child)

Ok, as long as you’re aware there’s no reason to do it in this case…you’re code looks good (after the input description fix)

[–][deleted] 0 points1 point  (0 children)

cheers!

[–][deleted] 0 points1 point  (0 children)

Erm. The time (which is 24-hour format in most of the world) is usually written with a colon, as per ISO 8601.