Hello! For part 1 of the instructions on the “checklist” there’s this
"You and your friend are planning a trip together and are trying to decide where to go. You each have specific criteria that it needs to fulfill. You want it to have a beach and city, whereas your friend wants beach or hiking. Your current pick is Barcelona, which is a city that has a beach. Will both you and your friend be happy?
bool variable named
yourNeeds . Write a logical comparison that captures your criteria."
So I added
bool yourNeeds = (city && beach);
and… it would not let me continue because I had to switch beach and city around.
Is that because the original code looks like this?
bool beach = true;
bool hiking = false;
bool city = true;
As in, did I literally have to put beach before city as a necessity for the code to run or was that just the lesson not letting me? The actual error says that I didn’t put it into parenthesis, when it was in parenthesis. However it also shows them swapped so I swapped the two (still keeping them within parenthesis) and it worked.
So yeah, is that something I should make a habit, to only add things in the order that they’re listed on top?