blockly 程式設計 題目2 : 九九乘法表

57 views
Skip to first unread message

snake

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

王重鈞

unread,
Apr 24, 2013, 7:00:49 AM4/24/13
to viator_...@googlegroups.com



snake於 2013年4月13日星期六UTC+8上午5時59分03秒寫道:

王重鈞

unread,
Apr 24, 2013, 7:04:17 AM4/24/13
to viator_...@googlegroups.com
九九乘法表(xml)
<xml>
  <block type="controls_repeat" x="144" y="-38">
    <title name="TIMES">10</title>
    <statement name="DO">
      <block type="variables_set" inline="false">
        <title name="VAR">x</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="math_number">
                <title name="NUM">1</title>
              </block>
            </value>
          </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">y</title>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number">
                    <title name="NUM">1</title>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="controls_for" inline="true">
                <title name="VAR">x</title>
                <value name="FROM">
                  <block type="math_number">
                    <title name="NUM">1</title>
                  </block>
                </value>
                <value name="TO">
                  <block type="math_number">
                    <title name="NUM">10</title>
                  </block>
                </value>
                <statement name="DO">
                  <block type="controls_for" inline="true">
                    <title name="VAR">y</title>
                    <value name="FROM">
                      <block type="math_number">
                        <title name="NUM">1</title>
                      </block>
                    </value>
                    <value name="TO">
                      <block type="math_number">
                        <title name="NUM">10</title>
                      </block>
                    </value>
                    <statement name="DO">
                      <block type="text_print" inline="false">
                        <value name="TEXT">
                          <block type="math_arithmetic" inline="true">
                            <title name="OP">MULTIPLY</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>
                      </block>
                    </statement>
                  </block>
                </statement>
                <next>
                  <block type="controls_flow_statements">
                    <title name="FLOW">BREAK</title>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
</xml>

snake於 2013年4月13日星期六UTC+8上午5時59分03秒寫道:

Reply all
Reply to author
Forward
0 new messages