No errors appear in the first sentence, but errors appear in the second sentence. I've done it and I've got a value of 9, so where is there a mistake?python
In a normal scenario, the IDx value increases by 1 from the position and returns idx when the character you are looking for is found. However, the code of the text seems to be idx and the code for finding letters.
I received a position as a parameter, but the search does not start with a position, but starts with the first character through the
For idx, the 5 entered as position is substituted, and the repetitive sentence looks for o from the first letter. The value of idx will increase by expression 1, starting with 5, and eventually find hell
o and add 4. The reason why the result is 9.
Ask the part that makes a mistake, so I just point out the part that makes a point out the part that makes a mistake. Fighting
© 2022 pinfo. All rights reserved.