


#Bleep bleep codecademy code
and it is observable by printing out the size and the index usedĪs for what SHOULD be done, well, what would you do with pen and paper? having code and not knowing what it does is a bit backwards, normally what you do is to decide what should happen and then describe that in code, and because this (the task of censoring a word) is something you can trivially do with pen and paper, you already have an observable reference for what should happen there. consider the max value of i+j and consider the maximum valid index, i+j is larger than that, so that’s outside. If you mean that it should be that way because some form of authority put it there, then, i explained what the problem is, and that is observable and easily reasoned about. But if instead we’re looking at what letter values in the portions held at text and word what is happening with text? Hopefully this confusion makes sense and someone can explain what is happening. At least numerically it would seem that no matter if the letters match or not, during the first loop of ’ j ’ that i = 0 so no matter what ’ i + j ’ will always =. I assume we’re trying to compare letter values to one another? But in that case why are we adding ’ i + j '? Why wouldn’t it just be text = word ? I’ve written it out on paper and am still confused about how it works. I’m confused about which values are being passed and what we’re comparing. In this instance ’ i ’ is from the first for loop and the ’ j ’ is the second nested for loop. There are a couple instances in the solution, inside nested loops, that have somethings like this: I was working through Bleep in the C++ course in the section on references-pointers found here:
