Let’s look at a classic “Seven Dots Puzzle”, also known as the “Three Lines Puzzle with Seven Dots” and if we code it in Python and show the solution interactively. In this puzzle, we have seven dots arranged in a specific configuration, and the challenge is to draw three straight lines such that each dot […]
Tag: puzzle
Python teaser/puzzle: FizzBuzz Twister
Objective For numbers 1 through 20, print “Fizz” if the number is divisible by 3 (no need to print the number), “Buzz” if it’s divisible by 5 (no need to print the number), and “FizzBuzz” if it’s divisible by both (no need to print the number). Otherwise, just print the number. For example, for numbers […]
The classic “Two Trains” problem with interactive solution
You may have heard of the classic puzzle: Two trains start from two towns, heading towards each other. One train leaves Town A heading towards Town B at some speed while at the same time, the other train leaves Town B heading towards Town A at another speed. If the distance between the two towns […]
Brain Teaser: Palindrome Checker 45611-1445
Here is a quick Python coding puzzle or brain teaser for educational and/or entertainment purposes. The challenge is quite simple but is useful for learning or refreshing your coding skills while exercising some logical thinking. Objective Write a Python program that takes an input from the user (a word or a phrase) and tells the […]
Brain Teaser: Get all numbers divisible by your choice of a number
Here’s a little brain teaser and the solution. The challenge is to get a number input from users and your task is to show all the numbers it can divide wholly (leaving no remainder) upto a certain limit. For example, if I want to know which numbers are divisible by 37, I would enter 37. […]
Python teaser/puzzle 45588-1346
This is a quick Python coding puzzle or brain teaser for educational and/or entertainment purposes. The challenge is quite simple but is useful for learning or refreshing your coding skills while exercising some logical thinking. Objective Write a Python function that returns the top n (highest) values from a list of numbers. For example, given […]
Python teaser/puzzle 45588-1338
This is a quick Python coding puzzle or brain teaser for educational and/or entertainment purposes. The challenge is quite simple but is useful for learning or refreshing your coding skills while exercising some logical thinking. Objective Write a function that returns the maximum difference between any two elements from a list of numbers. If the […]
Python teaser/puzzle 45588-1312
This is a quick Python coding puzzle or brain teaser for educational and/or entertainment purposes. The challenge is quite simple but is useful for learning or refreshing your coding skills while exercising some logical thinking. Objective Write a Python function that takes a list of integers as input and returns the 2 numbers that add […]
Can you solve this? Pattern matching
Every now and then, when my brain is bored, I come up with quizzes (around logic and code). This one’s about logic…specifically about color and order of the colored titles. Can you solve it? For more brain teasers and puzzles, click here.
If A=2, B = 10, C=30, D=68. what is E?
Hi again, time for a break 🙂 Fun little quiz, nothing to lose your sleep over because you can solve in a minute or two if you think about it, and it’s NOT a trick question. It has a definitive answer. The problem: If A=2, B = 10, C=30, D=68. what is E? (Assuming A-Z […]