mochamochi and many others are using Hackety Hack to learn how to code.

Hackety Hack is a free program for Windows, Mac OS X and Linux that can teach you how to make games, applications and more and share those programs with your friends. You can ask other budding programmers questions and follow them to see what code they're working on through the Hackety Hack website.

Sign up Learn More

calculator by mochamochi

Shoes.app :width => 340, :height => 420 do
  flow :width => 320 do
  
   # Layout   
   @title = title ( "Calculator" )
   @edit_line = edit_line
   @one = button "1"
   @two = button "2"
   @three = button "3"
   @plus = button "+"
   @four = button "4"
   @five = button "5"
   @six = button "6"
   @minus = button "-"
   @seven = button "7"
   @eight = button "8"
   @nine = button "9" 
   @times = button "*"  
   @zero = button "0"
   @decimal = button "."
   @divide = button "/"
   @delete = button "DEL"
   @equals = button "="

    # Parameters
    @title.style :width => 80, :height => 50, :stroke => darkmagenta, :size => 40
    @edit_line.style :width => 320, :height => 70
    @one.style :width => 80, :height => 50
    @two.style :width => 80, :height => 50
    @three.style :width => 80, :height => 50
    @plus.style :width => 80, :height => 50
    @four.style :width => 80, :height => 50
    @five.style :width => 80, :height => 50
    @six.style :width => 80, :height => 50
    @minus.style :width => 80, :height => 50
    @seven.style :width => 80, :height => 50
    @eight.style :width => 80, :height => 50
    @nine.style :width => 80, :height => 50
    @times.style :width => 80, :height => 50
    @zero.style :width => 160, :height => 50
    @decimal.style :width => 80, :height => 50
    @divide.style :width => 80, :height => 50
    @delete.style :width => 160, :height => 50
    @equals.style :width => 160, :height => 50
    
    # Function
    @one.click { para "1" }
    @two.click { para "2" }
    @three.click { para "3" }
    @plus.click { para "+" }
    @four.click { para "4" }
    @five.click { para "5" }
    @six.click { para "6" }
    @minus.click { para "-" }
    @seven.click { para "7" }
    @eight.click { para "8" }
    @nine.click { para "9" }
    @times.click { para "*" }
    @zero.click { para "0" }
    @decimal.click { para "." }
    @divide.click { para "/" }
    @equals.click { para "=" }
   end
  end