diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..c946b523e6fa986a563c04095dec3135d7d72a60 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Ignore virtual environments +.venv/ \ No newline at end of file diff --git a/logic_puzzles.csv b/logic_puzzles.csv new file mode 100644 index 0000000000000000000000000000000000000000..54890c49438fcfa3651ddec1c890e745a334e8bd --- /dev/null +++ b/logic_puzzles.csv @@ -0,0 +1,29 @@ +id,puzzle,answer,category,source +1,"There are two ducks in front of a duck, two ducks behind a duck and a duck in the middle. How many ducks are there?","Three. Two ducks are in front of the last duck; the first duck has two ducks behind; one duck is between the other two.","logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +2,"Five people were eating apples, A finished before B, but behind C. D finished before E, but behind B. What was the finishing order?","CABDE. Putting the first three in order, A finished in front of B but behind C, so CAB. Then, we know D finished before B, so CABD. We know E finished after D, so CABDE.","logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +3,"Jack is looking at Anne. Anne is looking at George. Jack is married, George is not, and we don't know if Anne is married. Is a married person looking at an unmarried person?","Yes. If Anne is married, then she is married and looking at George, who is unmarried. If Anne is unmarried, then Jack, who is married, is looking at her. Either way, the statement is correct.","logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +4,"A man has 53 socks in his drawer: 21 identical blue, 15 identical black and 17 identical red. The lights are out, and he is completely in the dark. How many socks must he take out to make 100 percent certain he has at least one pair of black socks?","40 socks. If he takes out 38 socks (adding the two biggest amounts, 21 and 17), although it is very unlikely, it is possible they could all be blue and red. To make 100 percent certain that he also has a pair of black socks he must take out a further two socks.","logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +5,"This ""burning rope"" problem is a classic logic puzzle. You have two ropes that each take an hour to burn; however, they burn at inconsistent rates. How can you measure 45 minutes? (You can light one or both ropes at one or both ends at the same time.)","Because they both burn inconsistently, you can't just light one end of a rope and wait until it’s 75 percent of the way through. But this is what you can do: Light the first rope at both ends and light the other rope at one end, all at the same time. The first rope will take 30 minutes to burn (even if one side burns faster than the other, it still takes 30 minutes). The moment the first rope goes out, light the other end of the second rope. Because the time elapsed of the second rope burning was 30 minutes, the remaining rope will also take 30 minutes; lighting it from both ends will cut that in half to 15 minutes, giving you 45 minutes altogether.","logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +6,"You're at a fork in the road in which one direction leads to the City of Lies (where everyone always lies) and the other to the City of Truth (where everyone always tells the truth). There's a person at the fork who lives in one of the cities, but you're not sure which one. What question could you ask the person to find out which road leads to the City of Truth?","""Which direction do you live?"" Someone from the City of Lies will lie and point to the City of Truth; someone from the City of Truth would tell the truth and also point to the City of Truth.","logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +7,"A girl meets a lion and unicorn in the forest. The lion lies every Monday, Tuesday and Wednesday, and the other days, he speaks the truth. The unicorn lies on Thursdays, Fridays and Saturdays, and the other days of the week, he speaks the truth. ""Yesterday, I was lying,"" the lion told the girl. ""So was I,"" said the unicorn. What day is it","Thursday. The only day they both tell the truth is Sunday, but today can't be Sunday because the lion also tells the truth on Saturday (yesterday). Going day by day, the only day one of them is lying and one of them is telling the truth with those two statements is Thursday.","logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +8,"There are three people (Alex, Ben and Cody), one of whom is a knight, one a knave and one a spy. The knight always tells the truth, the knave always lies and the spy can either lie or tell the truth. Alex says: ""Cody is a knave."" Ben says: ""Alex is a knight."" Cody says: ""I am the spy."" Who is the knight, who is the knave and who is the spy?","We know Ben isn't telling the truth because if he was, there would be two knights; so Ben could be either the knave or the spy. Cody also can't be the knight, because then his statement would be a lie. So, that must mean Alex is the knight. Ben, therefore, must be the spy, since the spy sometimes tells the truth; leaving Cody as the knave.","logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +9,"A farmer wants to cross a river and take with him a wolf, a goat and a cabbage. He has a boat, but it can only fit himself, plus either the wolf, the goat or the cabbage. If the wolf and the goat are alone on one shore, the wolf will eat the goat. If the goat and the cabbage are alone on the shore, the goat will eat the cabbage. How can the farmer bring the wolf, the goat and the cabbage across the river without anything being eaten?","First, the farmer takes the goat across. The farmer returns alone and then takes the wolf across but returns with the goat. Then, the farmer takes the cabbage across, leaving it with the wolf and returning alone to get the goat.","river crossing puzzle","https://parade.com/970343/parade/logic-puzzles/" +10,"Let's pretend we're on the metric system and use kilograms instead of pounds to give us a starting base number of 100. Four people (Alex, Brook, Chris and Dusty) want to cross a river in a boat that can only carry 100kg. Alex weighs 90kg, Brook weighs 80kg, Chris weighs 60kg and Dusty weighs 40kg, and they have 20kg of supplies. How do they get across?","There may be a couple of variations that will work, but here’s one way: Chris and Dusty row across (combined 100kg), and Dusty returns. Alex rows over, and Chris returns. Chris and Dusty row across again, and Dusty returns. Brook rows across with the supplies (combined 100kg), and Chris returns. Chris and Dusty row across again.","river crossing puzzle","https://parade.com/970343/parade/logic-puzzles/" +11,"This famous river crossing problem is known as the ""bridge and torch"" puzzle. Four people are crossing a bridge at night, so they all need a torch—but they just have one that only lasts 15 minutes. Alice can cross in one minute, Ben in two minutes, Cindy in five minutes and Don in eight minutes. No more than two people can cross at a time; and when two cross, they have to go at the slower person's pace. How do they get across in 15 minutes?","Alice and Ben cross first in two minutes, and Alice crosses back alone with the torch in one minute. Then, the two slowest people, Cindy and Don, cross in eight minutes. Ben returns in two minutes, and Alice and Ben return in two minutes. They just made it in 15 minutes exactly.","river crossing puzzle","https://parade.com/970343/parade/logic-puzzles/" +12,"A bad guy is playing Russian roulette with a six-shooter revolver. He puts in one bullet, spins the chambers and fires at you, but no bullet comes out. He gives you the choice of whether or not he should spin the chambers again before firing a second time. Should he spin again?","Yes. Before he spins, there's a one in six chance of a bullet being fired. After he spins, one of those chances has been taken away, leaving a one-in-five chance and making it more likely a bullet will be fired. Best to spin again.","deadly choices puzzle","https://parade.com/970343/parade/logic-puzzles/" +13,"This one could also fall in the lying/truth category. A man is caught on the king's property. He is brought before the king to be punished. The king says, ""You must give me a statement. If it is true, you will be killed by lions. If it is false, you will be killed by the trampling of wild buffalo. If I can't figure it out, I'll have to let you go."" Sure enough, the man was released. What was the man's statement?","""I will be killed by trampling of wild buffalo."" This stumped the king because if it's true, he'll be killed by lions, which would render the statement not true. If it's a lie, he'd be killed by wild buffalo, which would make it a truth. Since the king had no solution, he had to let the man go.","deadly choices puzzle","https://parade.com/970343/parade/logic-puzzles/" +14,"Susan and Lisa decided to play tennis against each other. They bet $1 on each game they played. Susan won three bets and Lisa won $5. How many games did they play?","Eleven. Because Lisa lost three games to Susan, she lost $3 ($1 per game). So, she had to win back that $3 with three more games, then win another five games to win $5.","hard logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +15,"If five cats can catch five mice in five minutes, how long will it take one cat to catch one mouse?","Five minutes. Using the information we know, it would take one cat 25 minutes to catch all five mice (5x5=25). Then, working backward and dividing 25 by five, we get five minutes for one cat to catch each mouse.","hard logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +16,"There are three bags, each containing two marbles. Bag A contains two white marbles, Bag B contains two black marbles and Bag C contains one white marble and one black marble. You pick a random bag and take out one marble, which is white. What is the probability that the remaining marble from the same bag is also white?","2 out of 3. You know you don't have Bag B. But because Bag A has two white marbles, you could have picked either marble; if you think of it as four marbles in total from Bags A and C, three white and one black, you'll have a greater chance of picking another white marble.","hard logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +17,"Three men are lined up behind each other. The tallest man is in the back and can see the heads of the two in front of him; the middle man can see the one man in front of him; the man in front can't see anyone. They are blindfolded, and hats are placed on their heads, picked from three black hats and two white hats. The extra two hats are hidden, and the blindfolds are removed. The tallest man is asked if he knows what color hat he's wearing; he doesn't. The middle man is asked if he knows; he doesn't. But the man in front, who can't see anyone, says he knows. How does he know, and what color hat is he wearing?","Black. The man in front knew he and the middle man aren't both wearing white hats or the man in the back would have known he had a black hat (since there are only two white hats). The man in front also knows the middle man didn't see him with a white hat because if he did, based on the tallest man's answer, the middle man would have known he himself was wearing a black hat. So, the man in front knows his hat must be black.","hard logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +18,"There are three crates, one with apples, one with oranges and one with both apples and oranges mixed. Each crate is closed and labeled with one of three labels: Apples, Oranges or Apples and Oranges. The label maker broke and labeled all of the crates incorrectly. How could you pick just one fruit from one crate to figure out what's in each crate?","Pick a fruit from the crate marked Apples and Oranges. If that fruit is an apple, you know that the crate should be labeled Apples because all of the labels are incorrect as they are. Therefore, you know the crate marked Apples must be Oranges (if it were labeled Apples and Oranges, the Oranges crate would be labeled correctly, and we know it isn't), and the one marked Oranges is Apples and Oranges. Alternately, if you picked an orange from the crate marked Apples and Oranges, you know that the crate should be marked Oranges, the one marked Oranges must be Apples and the one marked Apples must be Apples and Oranges.","hard logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +19,"You have five boxes in a row numbered 1 to 5, in which a cat is hiding. Every night, he jumps to an adjacent box, and every morning, you have one chance to open a box to find him. How do you win this game of hide and seek?","Check boxes 2, 3 and 4 in order until you find him. Here's why: He's either in an odd or even-numbered box. If he's in an even box (box 2 or 4) and you check box 2 and he's there, great; if not, you know he was in box 4, which means the next night he will move to box 3 or 5. The next morning, check box 3; if he's not there, that means he was in box 5, and so the next night he'll be in box 4, and you've got him. If he was in an odd-numbered box to begin with (1, 3, or 5), though, you might not find him in that first round of checking boxes 2, 3 and 4. But if this is the case, you know that on the fourth night, he'll have to be in an even-numbered box (because he switches every night: odd, even, odd, even), so then you can start the process again as described above. This means if you check boxes 2, 3 and 4 in that order, you will find him within two rounds (one round of 2, 3, 4; followed by another round of 2, 3, 4).","hard logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +20,"You are given three doors to choose from, one of which contains a car, and the other two contain goats. After you've chosen one but haven't opened it, Monty, who knows where everything is, reveals the location of a goat from behind one of the other two doors. Should you stick with your original choice or switch if you want the car?","You should switch. At the beginning, your choice starts out as a one in three chance of picking the car; the two doors with goats contain 2/3 of the chance. But since Monty knows and shows you where one of the goats is, that 2/3 chance now rests solely with the third door (your choice retains its original 1/3 chance; you were more likely to pick a goat to begin with). So, the odds are better if you switch.","hard logic puzzle","https://parade.com/970343/parade/logic-puzzles/" +21,"How do you make the number 7 even without addition, subtraction, multiplication, or division?","Drop the "S" and "seven" becomes "even".","logic puzzle","https://www.riddles.com/" +22,"David's father has three sons: Snap, Crackle, and _____?","David","logic puzzle","https://www.riddles.com/" +23,"A grandmother, two mothers and two daughters went shopping together and everyone bought one purse each. How many purses did they bring home all together?","3 (the grandmother is also a mother; the mother is also a daughter) – OR – 2 (both people are mothers and daughters and one is a grandmother)","logic puzzle","https://getriddles.com/logic-riddles/" +24,"You are all alone in a dark room with a match and matchbox. Nearby you have 3 objects: a candle, an oil lamp and a log of firewood. Which thing do you light first?","The match","logic puzzle","https://getriddles.com/logic-riddles/" +25,"A spider was given $28, an ant was given $21 and a chicken was given $7. How much money did the dog get?","$14 ($3.50 per leg)","logic puzzle","https://getriddles.com/logic-riddles/" +26,"You are participating in the swimming finals at the Olympics. In the final few seconds of the race you narrowly pass the swimmer who was in third place. What place did you get?","Third place","logic puzzle","https://getriddles.com/logic-riddles/" +27,"You are walking through a long train tunnel. When you’re one-third of the way through, you hear a train coming from behind. You know that if you run back to the entrance, you’ll make it out just in time, and if you run forward to the exit, you’ll also make it out just in time. Which way should you run to survive?","It doesn’t matter which way you run. If running either forward or backward will get you out just in time, both directions will give you the same result.","deadly choices puzzle","https://quickriddles.com/riddles-with-answers/" +28,"Two brothers are born on the same day, to the same parents, yet they are not twins. How is this possible?","They are triplets. The riddle only mentions two brothers but omits the fact that there is a third sibling.","logic puzzle","https://quickriddles.com/riddles-with-answers/" \ No newline at end of file