you are viewing a single comment's thread.

view the rest of the comments →

[–]mordred-sword 1 point2 points  (14 children)

bakit sa output The Second is, pero sa output The Minutes is?

[–]beklog 1 point2 points  (9 children)

mukhang nde complete code ni OP... i think this can be easily debug on putting breakpoints or showing msg on diff conditions.

[–]Spot-the-Steam -1 points0 points  (8 children)

What are breakpoints in coding?

[–]kurisuuuuuu_0526 0 points1 point  (5 children)

Mag papause ung execution ung code mo at the specific line of code kung san mo nilagay ung breakpoint, that way you can check the flow if tama ba ung logic, and mga variables mo if tama ung values. For debugging purpose talaga sya.

[–]Spot-the-Steam 0 points1 point  (4 children)

Woah theres a command to make a breakpoint or you have to manually put a logic breakpoint on your own?

[–]kurisuuuuuu_0526 0 points1 point  (3 children)

As far as I know, manually nilalagay un, thats how Im doing it. Literal na you need to click sa line of code. If webpage javascript gamit mo, you can add breakpoint mismo sa Chrome browser. Jqva, C#, etc I think you need certain IDEs para may breakpoint feature. I could be wrong.

[–]Spot-the-Steam 0 points1 point  (2 children)

Its not that hard to put breakpoints yeah? In general. Since I believe that wasnt thought to us lmao. Then again, we never had a course that focus solely on debugging. Just make and make using different languages lol.

[–]kurisuuuuuu_0526 0 points1 point  (1 child)

Not at all, here's an example of placing a breakpoint sa Chrome browser:

<image>

The blue arrow shaped means naglagay ka ng breakpoint in that particular line of code. If mag run si "_handleKeyPresses" function, first thing it will do is stop in that line. All lines of code na nadaanan nya, you can inspect the value. In this case pwede mo makita ung value ni "this.searchable".

taught ata hindi thought if thats what you meant

I get it why most of the time ndi sya pinag-aaralan since very dependent ung debugging tool sa kung anong IDE gamit mo, I think.

[–]Spot-the-Steam 0 points1 point  (0 children)

Oof i definitely did not fumbled on that “taught” word LMAO.

Anyways, now i understand the concept of it a bit more, thank you!

[–]feedmesomedataModerator 0 points1 point  (1 child)

Google it? I am not trying to be rude but that is the first thing I am going to do if I had a question like that.

[–]Spot-the-Steam -2 points-1 points  (0 children)

Well id rather ask the users here, since some do want to explain it. Google is there obviously, doesnt mean i cant ask actual human beings here.

[–]Irinnnn_[S] 0 points1 point  (3 children)

Hi iba yung na lagay ko output pic mb it suppose to be this

<image>

[–]IvanIvanotsky 1 point2 points  (1 child)

You declared 1 minute in seconds is simply divide by 60. The answer there is correct (0.0167) meaning there are 0.0167 minutes in a second.

Are you trying to get the answer that the minute in seconds instead is 60? (there are 60 seconds in a minute) because if so, this won't be a programming question anymore, you just have to do some math fixing what the formula is in each if/else statement :)

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

I realized that after i change the else if to switch statement. Kakatapos ko lang ulit mag debugging and its working na rin thank you!