#100daysblockcodingchallenge||Day3: Tower of Hanoi

 

Day3:Tower of Hanoi

Tower of Hanoi Algorithm
Tower of Hanoi is puzzle where we have 3 rods and 3 disk in this case. You may have n disks(I have mentioned buttons in video).
You have to move the Stack from one stick to another stick by obeying the following rules.
  1. Only one disk can be moved at a time.
  2. Only uppermost disk can be moved.
  3. No bigger disk can be placed on the top of smaller disk.
1)Source of  Disks 
 2)Destination of Disks.  

Note:Make Optimal Moves.

Block Based Coding:
Sample code for Blue Button

Output:
1)Success Case  2)Failure Case


Click here for Video Description



Comments

Popular posts from this blog

#100daysblockcodingchallenge||Day1:Drawing Polygons using Block based Code

#100dayschallengeinvedicmath||Day3-Multiply any number by 111

#100daysblockcodingchallenge||Day4: Scratch for teaching -Vedic Math