Learn Interfaces by Building an Equation Solver - Step 57

there are two roots tho no? also i have a question how do you understand this code so well like the topic of it?

Right, there are two roots, so they are going to be the first and second things in the array.

My job is programming, so I’d hope I know how to figure out code?

they are mutually exclusive, when case 1 happen, case 2 doesn’t happen, and viceversa, so there isn’t two things at the same time at same index


you are still missing a small but really impostant thing in your x2 string

1 Like

yeah but how do you understand this code and code in general so well, how do you know what this is about, is there a research phase you go through before attempting the code?

I’ve coded a lot of things and have lots of practice

well i assume what you are talking about is perhaps the index? because these two strings are the same, also when i put in the index 0 into x2 i don’t pass the step. I will get this tho it’s just gonna take a lot of thinking

The colors of these two strings are seriously different. The syntax highlighting is trying to help you here. The fact that {results[1]:+} is red and not white means the value is not being interpolated. What do you have to put at the start of a string to interpolate values? (You put it at the start of your first string)

okay i see, thanks a lot my friend.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.