Entries Tagged 'Logic Builders' ↓

Flowing text in Multiple TextAreas

This Logic Builder is particularly for Flex developers. And as it is, I am looking for the best solution to this! So here goes!

Flowing TextArea

The task is to flow a text in multiple text areas automatically. The height and width of each TextArea is fixed. There can be no scroll bars on any TextArea. When the text is overflowing (going out of the TextArea), it should be taken to the next TextArea. The application should show as many TextAreas as needed, to show the text entered.

As shown in the image, you can have a text area to enter the content, and a button. Clicking on the button should generate as many TextAreas as needed and flow the given text in them.

Hints:

 

Crossing the River

Ok, you have seen a few river crossing puzzles, right? Then solve this one!

Instructions:

  • Help these people to cross the river, in the next screen.
  • Only two people at a time, at least one adult.
  • Criminal (in striped dress) cannot be left with others, without the Police.
  • Mother cannot be with sons, while father is not around.
  • Father cannot be with daughters, while mother is not around.
  • Click on the BIG BLUE BUTTON to start!
  • Click on people to get them on or off the boat.
  • Click on the Red buttons to move the boat to opposite side.

For more, checkout FunGloo.

 

Puzzle of 65

65 Puzzle

Sneha (my sister in law) asked me to solve this puzzle. If you sum up any side, the total always comes to 65. The puzzle is to find out the pattern in this. A pattern that you can extend to any odd dimension matrix. This one is 5×5, the logic of placing the numbers will work in 7×7 or 9×9 and so on…

She took an hour to solve it, and after a week of keeping the puzzle in my bag and not solving it, I simply asked her for the solution!

Can you figure it out?

And can your sister in law figure it out? ;-)

 

LB : Network Strength Detector

Here’s a new Logic Builder:

Display an image with 4 bars. The more the bars, the better the network signal strength. Next to it will be a text box. Values for the current network signal strength will be provided as percentages in this text box. Multiple values will be separated by a new line. Using AJAX, submit the signal strength values to the backend and update the signal strength indicator. To determine the strength, average the last four values. If strength is 0, no bar should be highlighted. If 1 to 25%, show one bar. Two bars between 26 and 50. Three for 51 to 75. Four above 76%.

Happy AJAXing!

 

LB: Faulty Calculator

Your dad found out a calculator that he used while he was in college. It’s still in good shape but a few keys are not working properly. You really like the calculator - it’s unique, runs on solar power and works overall. You also figured out how to solve some of the idiosyncrasies of the machine.

  • The 5 digit comes only if you press the 5 key twice.
  • If the immediate number after 5 is 2, 5 works on single key press, but 2 requires two presses.
  • If you do not press any other key after 1, it keeps taking 1 as input (so 11111111…)
  • If the result of the last calculation had 2 and 3 in it, you have to press the Clear button twice to actually clear it

You are comfortable using the calculator now, but you now want to build a simple software that mimics your calculator. More importantly, you want your younger sis to use the software as well. Catch is that she does not know the “bugs” in the calculator that we talked about earlier. So when she is using it, you want to convert her input in a format that your calculator can understand. And then take the result from the calculator and show it to her in a way that she can understand.

Ready for the challenge? Then go ahead and code it up!


What are Logic Builders?
Logic Builders are puzzles that you solve using a programming language of your choice. The idea is to improve the logical and programming abilities by solving a fun problem. The puzzles also require use of some data structures so your skills in effective data management also improve. And of course, you have to code for boundary conditions to pass ;-)