Blockly 程式設計 2013_04_13 課堂功課:(1) 計算平均值 (2) 計算1~N的總和 (3) 找1~N的所有質數 (4) 最小公倍數 (5) 計算第N項費氏數列

740 views
Skip to first unread message

snake

unread,
Apr 12, 2013, 6:19:11 PM4/12/13
to viator_...@googlegroups.com

Snake

unread,
Apr 12, 2013, 10:29:24 PM4/12/13
to viator_...@googlegroups.com


snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

Snake

unread,
Apr 12, 2013, 10:30:05 PM4/12/13
to viator_...@googlegroups.com



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

國一12_28號

unread,
Apr 12, 2013, 10:36:58 PM4/12/13
to viator_...@googlegroups.com



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

國一12_28號

unread,
Apr 12, 2013, 10:37:58 PM4/12/13
to viator_...@googlegroups.com

計算平均值



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

陳辰瑋

unread,
Apr 12, 2013, 10:38:25 PM4/12/13
to viator_...@googlegroups.com

累加的答案

snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

李文安

unread,
Apr 12, 2013, 10:42:16 PM4/12/13
to viator_...@googlegroups.com


snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:
01.bmp

國一12_28號

unread,
Apr 12, 2013, 10:43:59 PM4/12/13
to viator_...@googlegroups.com

                                                                 計算1~N的總和

snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

陳怡升

unread,
Apr 12, 2013, 10:47:40 PM4/12/13
to viator_...@googlegroups.com
(1) 計算平均值 (2) 計算1~N的總和 
12.bmp
11.bmp

陳辰瑋

unread,
Apr 12, 2013, 10:48:16 PM4/12/13
to viator_...@googlegroups.com
n階
xml檔


<xml>
  <block type="variables_set" inline="false" x="-696" y="-353">
    <title name="VAR">x</title>
    <value name="VALUE">
      <block type="text_prompt">
        <title name="TYPE">NUMBER</title>
        <title name="TEXT">請輸入n</title>
      </block>
    </value>
    <next>
      <block type="variables_set" inline="false">
        <title name="VAR">y</title>
        <value name="VALUE">
          <block type="math_number">
            <title name="NUM">0</title>
          </block>
        </value>
        <next>
          <block type="controls_for" inline="true">
            <title name="VAR">i</title>
            <value name="FROM">
              <block type="math_number">
                <title name="NUM">1</title>
              </block>
            </value>
            <value name="TO">
              <block type="variables_get">
                <title name="VAR">x</title>
              </block>
            </value>
            <statement name="DO">
              <block type="variables_set" inline="false">
                <title name="VAR">y</title>
                <value name="VALUE">
                  <block type="math_arithmetic" inline="true">
                    <title name="OP">ADD</title>
                    <value name="A">
                      <block type="variables_get">
                        <title name="VAR">y</title>
                      </block>
                    </value>
                    <value name="B">
                      <block type="variables_get">
                        <title name="VAR">i</title>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </statement>
            <next>
              <block type="text_print" inline="false">
                <value name="TEXT">
                  <block type="variables_get">
                    <title name="VAR">y</title>
                  </block>
                </value>
              </block>
            </next>
          </block>
        </next>
      </block>
    </next>
  </block>
  <block type="math_number" x="-804" y="-174">
    <title name="NUM">1</title>
  </block>
  <block type="math_number" x="-806" y="-137">
    <title name="NUM">1</title>
  </block>
</xml>

snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

陳逸雲

unread,
Apr 12, 2013, 11:01:37 PM4/12/13
to viator_...@googlegroups.com


snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:
0.bmp

廖韋晴

unread,
Apr 12, 2013, 11:04:50 PM4/12/13
to viator_...@googlegroups.com



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

good...@gmail.com

unread,
Apr 12, 2013, 11:07:30 PM4/12/13
to viator_...@googlegroups.com


snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

good...@gmail.com

unread,
Apr 12, 2013, 11:08:50 PM4/12/13
to viator_...@googlegroups.com
<xml>
  <block type="variables_set" inline="false" x="-1182" y="-895">
    <title name="VAR">x</title>
    <value name="VALUE">
      <block type="text_prompt">
        <title name="TYPE">NUMBER</title>
        <title name="TEXT">輸入幾個數 ?</title>
                <title name="VAR">z</title>
                <value name="VALUE">
                  <block type="text_prompt">
                    <title name="TYPE">NUMBER</title>
                    <title name="TEXT">請輸入一正整數</title>
                  </block>
                </value>
                <next>
                  <block type="variables_set" inline="false">
                    <title name="VAR">y</title>
                    <value name="VALUE">
                      <block type="math_arithmetic" inline="true">
                        <title name="OP">ADD</title>
                        <value name="A">
                          <block type="variables_get">
                            <title name="VAR">z</title>
                          </block>
                        </value>
                        <value name="B">
                          <block type="variables_get">
                            <title name="VAR">y</title>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </next>
              </block>
            </statement>
            <next>
              <block type="text_print" inline="false">
                <value name="TEXT">
                  <block type="math_arithmetic" inline="true">
                    <title name="OP">DIVIDE</title>
                    <value name="A">
                      <block type="variables_get">
                        <title name="VAR">y</title>
                      </block>
                    </value>
                    <value name="B">
                      <block type="variables_get">
                        <title name="VAR">x</title>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </next>
          </block>
        </next>
      </block>
    </next>
  </block>
</xml>

snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

廖證硯

unread,
Apr 12, 2013, 11:08:59 PM4/12/13
to viator_...@googlegroups.com


snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

廖證硯

unread,
Apr 12, 2013, 11:09:27 PM4/12/13
to viator_...@googlegroups.com



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

廖韋晴

unread,
Apr 12, 2013, 11:10:47 PM4/12/13
to viator_...@googlegroups.com

(2) 計算1~N的總和



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

陳逸雲

unread,
Apr 12, 2013, 11:11:27 PM4/12/13
to viator_...@googlegroups.com



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:
Message has been deleted

陳怡升

unread,
Apr 12, 2013, 11:24:31 PM4/12/13
to viator_...@googlegroups.com



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

廖韋晴

unread,
Apr 12, 2013, 11:26:00 PM4/12/13
to viator_...@googlegroups.com

費氏數列



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

陳辰瑋

unread,
Apr 12, 2013, 11:26:02 PM4/12/13
to viator_...@googlegroups.com
費事數列

<xml>
  <block type="variables_set" inline="false" x="-385" y="-208">
    <title name="VAR">fn</title>
    <value name="VALUE">
      <block type="text_prompt">
        <title name="TYPE">NUMBER</title>
        <title name="TEXT">請輸入數字</title>
      </block>
    </value>
    <next>
      <block type="variables_set" inline="false">
        <title name="VAR">x</title>
        <value name="VALUE">
          <block type="math_number">
            <title name="NUM">1</title>
          </block>
        </value>
        <next>
          <block type="variables_set" inline="false">
            <title name="VAR">y</title>
            <value name="VALUE">
              <block type="math_number">
                <title name="NUM">1</title>
              </block>
            </value>
            <next>
              <block type="variables_set" inline="false">
                <title name="VAR">z</title>
                <value name="VALUE">
                  <block type="math_number">
                    <title name="NUM">0</title>
                  </block>
                </value>
                <next>
                  <block type="controls_if" inline="false">
                    <mutation else="1"></mutation>
                    <value name="IF0">
                      <block type="logic_compare" inline="true">
                        <title name="OP">LTE</title>
                        <value name="A">
                          <block type="variables_get">
                            <title name="VAR">fn</title>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number">
                            <title name="NUM">2</title>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="variables_set" inline="false">
                        <title name="VAR">z</title>
                        <value name="VALUE">
                          <block type="math_number">
                            <title name="NUM">1</title>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <statement name="ELSE">
                      <block type="controls_for" inline="true">
                        <title name="VAR">i</title>
                        <value name="FROM">
                          <block type="math_number">
                            <title name="NUM">3</title>
                          </block>
                        </value>
                        <value name="TO">
                          <block type="variables_get">
                            <title name="VAR">fn</title>
                          </block>
                        </value>
                        <statement name="DO">
                          <block type="variables_set" inline="false">
                            <title name="VAR">z</title>
                            <value name="VALUE">
                              <block type="math_arithmetic" inline="true">
                                <title name="OP">ADD</title>
                                <value name="A">
                                  <block type="variables_get">
                                    <title name="VAR">x</title>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="variables_get">
                                    <title name="VAR">y</title>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="variables_set" inline="false">
                                <title name="VAR">x</title>
                                <value name="VALUE">
                                  <block type="variables_get">
                                    <title name="VAR">y</title>
                                  </block>
                                </value>
                                <next>
                                  <block type="variables_set" inline="false">
                                    <title name="VAR">y</title>
                                    <value name="VALUE">
                                      <block type="variables_get">
                                        <title name="VAR">z</title>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </statement>
                    <next>
                      <block type="text_print" inline="false">
                        <value name="TEXT">
                          <block type="variables_get">
                            <title name="VAR">z</title>
                          </block>
                        </value>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </next>
  </block>
</xml>

snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

李文安

unread,
Apr 12, 2013, 11:26:17 PM4/12/13
to viator_...@googlegroups.com

(4) 最小公倍數

snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:
最小公倍數.bmp

國二十48

unread,
Apr 12, 2013, 11:29:25 PM4/12/13
to viator_...@googlegroups.com
1+~N
21048.bmp

國一12_28號

unread,
Apr 12, 2013, 11:30:37 PM4/12/13
to viator_...@googlegroups.com

                                                                      費氏數列

snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

楊澤綱

unread,
Apr 12, 2013, 11:31:29 PM4/12/13
to viator_...@googlegroups.com



在 2013年4月13日星期六UTC+8上午6时19分11秒,snake写道:

Snake

unread,
Apr 12, 2013, 11:31:52 PM4/12/13
to viator_...@googlegroups.com



snake於 2013年4月13日星期六UTC+8上午6時19分11秒寫道:

邱暐幄

unread,
Apr 12, 2013, 11:33:41 PM4/12/13
to viator_...@googlegroups.com
平均值.bmp

陳辰瑋

unread,
Apr 12, 2013, 11:35:43 PM4/12/13
to viator_...@googlegroups.com



陳辰瑋於 2013年4月13日星期六UTC+8上午11時26分02秒寫道:

江承翰

unread,
Apr 12, 2013, 11:35:48 PM4/12/13
to viator_...@googlegroups.com

李文安

unread,
Apr 12, 2013, 11:36:17 PM4/12/13
to viator_...@googlegroups.com
(4) 最小公倍數 修改版
最小公倍數.bmp

good...@gmail.com

unread,
Apr 12, 2013, 11:36:31 PM4/12/13
to viator_...@googlegroups.com
blockly 
累加計算:
<xml>
  <block type="variables_set" inline="false" x="-862" y="-755">
    <title name="VAR">x</title>
    <value name="VALUE">
      <block type="text_prompt">
        <title name="TYPE">NUMBER</title>
        <title name="TEXT">請輸入從1加到什麼數?_</title>
      </block>
    </value>
    <next>
      <block type="variables_set" inline="false">
        <title name="VAR">y</title>
        <value name="VALUE">
          <block type="math_number">
            <title name="NUM">0</title>
          </block>
        </value>
        <next>
          <block type="controls_for" inline="true">
            <title name="VAR">i</title>
            <value name="FROM">
              <block type="math_number">
                <title name="NUM">1</title>
              </block>
            </value>
            <value name="TO">
              <block type="variables_get">
                <title name="VAR">x</title>
              </block>
            </value>
            <statement name="DO">
              <block type="variables_set" inline="false">
                <title name="VAR">y</title>
                <value name="VALUE">
                  <block type="math_arithmetic" inline="true">
                    <title name="OP">ADD</title>
                    <value name="A">
                      <block type="variables_get">
                        <title name="VAR">y</title>
                      </block>
                    </value>
                    <value name="B">
                      <block type="variables_get">
                        <title name="VAR">i</title>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </statement>
            <next>
              <block type="text_print" inline="false">
                <value name="TEXT">
                  <block type="variables_get">
                    <title name="VAR">y</title>
                  </block>
                </value>
              </block>
            </next>
          </block>
        </next>
      </block>
    </next>
  </block>
</xml>

samu...@gmail.com

unread,
Apr 12, 2013, 11:37:29 PM4/12/13
to viator_...@googlegroups.com

江承翰

unread,
Apr 12, 2013, 11:37:34 PM4/12/13
to viator_...@googlegroups.com
xml



<xml>
  <block type="variables_set" inline="false" x="6" y="-24">
    <title name="VAR">a</title>
    <value name="VALUE">
      <block type="math_number">
        <title name="NUM">1</title>
      </block>
    </value>
    <next>
      <block type="variables_set" inline="false">
        <title name="VAR">b</title>
        <value name="VALUE">
          <block type="math_number">
            <title name="NUM">1</title>
          </block>
        </value>
        <next>
          <block type="text_print" inline="false">
            <value name="TEXT">
              <block type="text">
                <title name="TEXT"> 費氏數列項數程式</title>
              </block>
            </value>
            <next>
              <block type="variables_set" inline="false">
                <title name="VAR">c</title>
                <value name="VALUE">
                  <block type="text_prompt">
                    <title name="TYPE">NUMBER</title>
                    <title name="TEXT">請輸入您要算費氏數列的第幾項?</title>
                  </block>
                </value>
                <next>
                  <block type="controls_if" inline="false">
                    <mutation elseif="1" else="1"></mutation>
                    <value name="IF0">
                      <block type="logic_compare" inline="true">
                        <title name="OP">EQ</title>
                        <value name="A">
                          <block type="variables_get">
                            <title name="VAR">c</title>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number">
                            <title name="NUM">1</title>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="text_print" inline="false">
                        <value name="TEXT">
                          <block type="text_join" inline="false">
                            <mutation items="4"></mutation>
                            <value name="ADD0">
                              <block type="text">
                                <title name="TEXT">費氏數列的第</title>
                              </block>
                            </value>
                            <value name="ADD1">
                              <block type="math_number">
                                <title name="NUM">1</title>
                              </block>
                            </value>
                            <value name="ADD2">
                              <block type="text">
                                <title name="TEXT">項為</title>
                              </block>
                            </value>
                            <value name="ADD3">
                              <block type="math_number">
                                <title name="NUM">1</title>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <value name="IF1">
                      <block type="logic_compare" inline="true">
                        <title name="OP">EQ</title>
                        <value name="A">
                          <block type="variables_get">
                            <title name="VAR">c</title>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number">
                            <title name="NUM">2</title>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO1">
                      <block type="text_print" inline="false">
                        <value name="TEXT">
                          <block type="text_join" inline="false">
                            <mutation items="4"></mutation>
                            <value name="ADD0">
                              <block type="text">
                                <title name="TEXT">費氏數列的第</title>
                              </block>
                            </value>
                            <value name="ADD1">
                              <block type="math_number">
                                <title name="NUM">2</title>
                              </block>
                            </value>
                            <value name="ADD2">
                              <block type="text">
                                <title name="TEXT">項為</title>
                              </block>
                            </value>
                            <value name="ADD3">
                              <block type="math_number">
                                <title name="NUM">1</title>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <statement name="ELSE">
                      <block type="controls_for" inline="true">
                        <title name="VAR">i</title>
                        <value name="FROM">
                          <block type="math_number">
                            <title name="NUM">1</title>
                          </block>
                        </value>
                        <value name="TO">
                          <block type="math_arithmetic" inline="true">
                            <title name="OP">MINUS</title>
                            <value name="A">
                              <block type="variables_get">
                                <title name="VAR">c</title>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number">
                                <title name="NUM">2</title>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO">
                          <block type="variables_set" inline="false">
                            <title name="VAR">sum</title>
                            <value name="VALUE">
                              <block type="math_arithmetic" inline="true">
                                <title name="OP">ADD</title>
                                <value name="A">
                                  <block type="variables_get">
                                    <title name="VAR">a</title>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="variables_get">
                                    <title name="VAR">b</title>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="variables_set" inline="false">
                                <title name="VAR">a</title>
                                <value name="VALUE">
                                  <block type="variables_get">
                                    <title name="VAR">b</title>
                                  </block>
                                </value>
                                <next>
                                  <block type="variables_set" inline="false">
                                    <title name="VAR">b</title>
                                    <value name="VALUE">
                                      <block type="variables_get">
                                        <title name="VAR">sum</title>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <next>
                          <block type="text_print" inline="false">
                            <value name="TEXT">
                              <block type="text_join" inline="false">
                                <mutation items="4"></mutation>
                                <value name="ADD0">
                                  <block type="text">
                                    <title name="TEXT">費氏數列的第</title>
                                  </block>
                                </value>
                                <value name="ADD1">
                                  <block type="variables_get">
                                    <title name="VAR">c</title>
                                  </block>
                                </value>
                                <value name="ADD2">
                                  <block type="text">
                                    <title name="TEXT">項為</title>
                                  </block>
                                </value>
                                <value name="ADD3">
                                  <block type="variables_get">
                                    <title name="VAR">sum</title>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </next>
  </block>
</xml>

棨程 曹

unread,
Apr 12, 2013, 11:38:04 PM4/12/13
to viator_...@googlegroups.com
費式數列
<xml>
  <block type="variables_set" inline="false" x="-837" y="-380">
    <title name="VAR">x</title>
    <value name="VALUE">
      <block type="text_prompt">
        <title name="TYPE">NUMBER</title>
        <title name="TEXT">請問要費式數列的第幾項</title>
      </block>
    </value>
    <next>
      <block type="variables_set" inline="false">
        <title name="VAR">a</title>
        <value name="VALUE">
          <block type="math_number">
            <title name="NUM">1</title>
          </block>
        </value>
        <next>
          <block type="variables_set" inline="false">
            <title name="VAR">b</title>
            <value name="VALUE">
              <block type="math_number">
                <title name="NUM">1</title>
              </block>
            </value>
            <next>
              <block type="controls_for" inline="true">
                <title name="VAR">i</title>
                <value name="FROM">
                  <block type="math_number">
                    <title name="NUM">1</title>
                  </block>
                </value>
                <value name="TO">
                  <block type="math_arithmetic" inline="true">
                    <title name="OP">MINUS</title>
                    <value name="A">
                      <block type="variables_get">
                        <title name="VAR">x</title>
                      </block>
                    </value>
                    <value name="B">
                      <block type="math_number">
                        <title name="NUM">2</title>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO">
                  <block type="variables_set" inline="false">
                    <title name="VAR">c</title>
                    <value name="VALUE">
                                <title name="VAR">c</title>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
                <next>
                  <block type="text_print" inline="false">
                    <value name="TEXT">
                      <block type="text_join" inline="false">
                        <mutation items="2"></mutation>
                        <value name="ADD0">
                          <block type="text">
                            <title name="TEXT">此數為</title>
                          </block>
                        </value>
                        <value name="ADD1">
                          <block type="variables_get">
                            <title name="VAR">c</title>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </next>
              </block>
            </next>
          </block>

李文安

unread,
Apr 12, 2013, 11:38:04 PM4/12/13
to viator_...@googlegroups.com
http://blockly-demo.appspot.com/static/apps/code/zh_tw.html#c83tdp


李文安於 2013年4月13日星期六UTC+8上午11時36分17秒寫道:

廖韋晴

unread,
Apr 12, 2013, 11:38:13 PM4/12/13
to viator_...@googlegroups.com

朱識文

unread,
Apr 12, 2013, 11:39:30 PM4/12/13
to viator_...@googlegroups.com
Blockly算總和.JPG
Blockly算平均值.JPG
Blockly算費氏數列.JPG

棨程 曹

unread,
Apr 12, 2013, 11:40:23 PM4/12/13
to viator_...@googlegroups.com

江承翰

unread,
Apr 12, 2013, 11:42:39 PM4/12/13
to viator_...@googlegroups.com

samu...@gmail.com

unread,
Apr 12, 2013, 11:56:06 PM4/12/13
to viator_...@googlegroups.com

<xml>
  <block type="variables_set" inline="false" x="266" y="-92">
    <title name="VAR">A</title>
    <value name="VALUE">
      <block type="math_number">
        <title name="NUM">1</title>
      </block>
    </value>
    <next>
      <block type="variables_set" inline="false">
        <title name="VAR">B</title>
        <value name="VALUE">
          <block type="math_number">
            <title name="NUM">0</title>
          </block>
        </value>
        <next>
          <block type="variables_set" inline="false">
            <title name="VAR">C</title>
            <value name="VALUE">
              <block type="math_number">
                <title name="NUM">0</title>
              </block>
            </value>
            <next>
              <block type="variables_set" inline="false">
                <title name="VAR">X</title>
                <value name="VALUE">
                  <block type="text_prompt">
                    <title name="TYPE">NUMBER</title>
                    <title name="TEXT">要多少費式數列</title>
                  </block>
                </value>
                <next>
                  <block type="controls_if" inline="false">
                    <value name="IF0">
                      <block type="logic_compare" inline="true">
                        <title name="OP">EQ</title>
                        <value name="A">
                          <block type="variables_get">
                            <title name="VAR">X</title>
                          </block>
                        </value>
                        <value name="B">
                          <block type="variables_get">
                            <title name="VAR">D</title>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="text_print" inline="false">
                        <value name="TEXT">
                          <block type="math_number">
                            <title name="NUM">1</title>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <next>
                      <block type="controls_if" inline="false">
                        <value name="IF0">
                          <block type="logic_compare" inline="true">
                            <title name="OP">GT</title>
                            <value name="A">
                              <block type="variables_get">
                                <title name="VAR">X</title>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number">
                                <title name="NUM">1</title>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="controls_for" inline="true">
                            <title name="VAR">i</title>
                            <value name="FROM">
                              <block type="math_number">
                                <title name="NUM">1</title>
                              </block>
                            </value>
                            <value name="TO">
                              <block type="math_arithmetic" inline="true">
                                <title name="OP">MINUS</title>
                                <value name="A">
                                  <block type="variables_get">
                                    <title name="VAR">X</title>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number">
                                    <title name="NUM">1</title>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO">
                              <block type="variables_set" inline="false">
                                <title name="VAR">C</title>
                                <value name="VALUE">
                                  <block type="math_arithmetic" inline="true">
                                    <title name="OP">ADD</title>
                                    <value name="A">
                                      <block type="variables_get">
                                        <title name="VAR">A</title>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="variables_get">
                                        <title name="VAR">B</title>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="variables_set" inline="false">
                                    <title name="VAR">A</title>
                                    <value name="VALUE">
                                      <block type="variables_get">
                                        <title name="VAR">C</title>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="variables_set" inline="false">
                                        <title name="VAR">B</title>
                                        <value name="VALUE">
                                          <block type="variables_get">
                                            <title name="VAR">A</title>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="variables_set" inline="false">
                                            <title name="VAR">D</title>
                                            <value name="VALUE">
                                              <block type="variables_get">
                                                <title name="VAR">C</title>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <next>
                              <block type="text_print" inline="false">
                                <value name="TEXT">
                                  <block type="variables_get">
                                    <title name="VAR">D</title>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </next>
  </block>
</xml>
Reply all
Reply to author
Forward
0 new messages