Hello!! 🙋♀️ To Finish with the #7DaysChallenge initiative, In our last challenge we will work with a logic exercise which is very good for solving programming problems!
The challenge shows you a code which you must analyze carefully to see the final result! The solution is below, but don’t see it before analyse your answer! Let us begin!
I invite you to take a look at all the challenges of this initiative, each of them has its technical explanations and recommended articles to study! You can give them an eye in the article #7DaysChallenge with Xammy.
🎯 Day 7- Let’s develop the logic for programmingDo you already have the answers? 👀👀👀
💡 Click here to see the solution
The correct answer is the option A! 🎊
The correct answer is A due to the following points:
- Step 1: All the labels are interchanged, let’s imagine that we open the box with the Pears label and it turns out that it has the oranges. At that moment you already know that there you are going to put the label of the oranges.
- Step 2: We only have the pear and apple labels left, you know that the apple one is not the correct one so those are the pears and you only have one box left for the remaining label which is the apple one.
I hope you liked it and it was useful!
I’ll wait for you in the next challenge! 😎 Thank for reading! 💚💕