<xml xmlns="http://www.w3.org/1999/xhtml">
  <variables>
    <variable type="">CANDIDATE1</variable>
    <variable type="">CANDIDATE2</variable>
    <variable type="">VOTESFOR1</variable>
    <variable type="">VOTESFOR2</variable>
    <variable type="">TOTALVOTES</variable>
  </variables>
  <block type="logo_defproc_nr" x="21" y="-1131">
    <mutation inputs="0"></mutation>
    <field name="NAME">SETUP</field>
    <field name="COUNT">0</field>
    <statement name="CODE">
      <block type="draw_clear">
        <next>
          <block type="draw_setfont">
            <field name="NAME">HELVETICA</field>
            <value name="SIZE">
              <shadow type="logo_number">
                <field name="NUM">48</field>
              </shadow>
            </value>
            <next>
              <block type="turtle_setpc_any">
                <value name="COLOUR">
                  <shadow type="logo_colour_picker">
                    <field name="COLOUR">#ff0000</field>
                  </shadow>
                </value>
                <next>
                  <block type="turtle_setpen">
                    <field name="MODE">PENUP</field>
                    <next>
                      <block type="turtle_goto">
                        <value name="X">
                          <shadow type="logo_number">
                            <field name="NUM">-100</field>
                          </shadow>
                        </value>
                        <value name="Y">
                          <shadow type="logo_number">
                            <field name="NUM">200</field>
                          </shadow>
                        </value>
                        <next>
                          <block type="turtle_setpen">
                            <field name="MODE">PENDOWN</field>
                            <next>
                              <block type="draw_text">
                                <value name="TEXT">
                                  <shadow type="logo_text">
                                    <field name="TEXT">Hello</field>
                                  </shadow>
                                  <block type="logo_text">
                                    <field name="TEXT">VOTE TODAY!</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="turtle_setpen">
                                    <field name="MODE">PENUP</field>
                                    <next>
                                      <block type="turtle_home">
                                        <next>
                                          <block type="turtle_setpen">
                                            <field name="MODE">PENDOWN</field>
                                            <next>
                                              <block type="turtle_hide"></block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <next>
      <block type="logo_defproc_nr">
        <mutation inputs="0"></mutation>
        <field name="NAME">GETVOTES</field>
        <field name="COUNT">0</field>
        <statement name="CODE">
          <block type="variables_set">
            <field name="VAR" variabletype="">CANDIDATE1</field>
            <value name="VALUE">
              <block type="logo_prompt">
                <field name="NOCASE">TRUE</field>
                <value name="TEXT">
                  <shadow type="logo_text">
                    <field name="TEXT">What is the name of candidate 1?</field>
                  </shadow>
                </value>
              </block>
            </value>
            <next>
              <block type="variables_set">
                <field name="VAR" variabletype="">CANDIDATE2</field>
                <value name="VALUE">
                  <block type="logo_prompt">
                    <field name="NOCASE">TRUE</field>
                    <value name="TEXT">
                      <shadow type="logo_text">
                        <field name="TEXT">What is the name of candidate 2?</field>
                      </shadow>
                    </value>
                  </block>
                </value>
                <next>
                  <block type="variables_set">
                    <field name="VAR" variabletype="">VOTESFOR1</field>
                    <value name="VALUE">
                      <block type="logo_prompt">
                        <field name="NOCASE">TRUE</field>
                        <value name="TEXT">
                          <shadow type="logo_text">
                            <field name="TEXT">How many votes did Candidate 1 get?</field>
                          </shadow>
                          <block type="logo_list">
                            <mutation count="3"></mutation>
                            <field name="COUNT">3</field>
                            <field name="FLATTEN">FALSE</field>
                            <value name="ELEM0">
                              <block type="logo_text">
                                <field name="TEXT">How many votes did</field>
                              </block>
                            </value>
                            <value name="ELEM1">
                              <block type="variables_get">
                                <field name="VAR" variabletype="">CANDIDATE1</field>
                              </block>
                            </value>
                            <value name="ELEM2">
                              <block type="logo_text">
                                <field name="TEXT">get?</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set">
                        <field name="VAR" variabletype="">VOTESFOR2</field>
                        <value name="VALUE">
                          <block type="logo_prompt">
                            <field name="NOCASE">TRUE</field>
                            <value name="TEXT">
                              <shadow type="logo_text">
                                <field name="TEXT">How many votes did Candidate 1 get?</field>
                              </shadow>
                              <block type="logo_list">
                                <mutation count="3"></mutation>
                                <field name="COUNT">3</field>
                                <field name="FLATTEN">FALSE</field>
                                <value name="ELEM0">
                                  <block type="logo_text">
                                    <field name="TEXT">How many votes did</field>
                                  </block>
                                </value>
                                <value name="ELEM1">
                                  <block type="variables_get">
                                    <field name="VAR" variabletype="">CANDIDATE2</field>
                                  </block>
                                </value>
                                <value name="ELEM2">
                                  <block type="logo_text">
                                    <field name="TEXT">get?</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set">
                            <field name="VAR" variabletype="">TOTALVOTES</field>
                            <value name="VALUE">
                              <block type="logo_arithmetic">
                                <field name="OP">ADD</field>
                                <value name="A">
                                  <block type="variables_get">
                                    <field name="VAR" variabletype="">VOTESFOR1</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="variables_get">
                                    <field name="VAR" variabletype="">VOTESFOR2</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="turtle_setpc_any">
                                <value name="COLOUR">
                                  <shadow type="logo_colour_picker">
                                    <field name="COLOUR">#008000</field>
                                  </shadow>
                                </value>
                                <next>
                                  <block type="turtle_setpen">
                                    <field name="MODE">PENUP</field>
                                    <next>
                                      <block type="turtle_goto">
                                        <value name="X">
                                          <shadow type="logo_number">
                                            <field name="NUM">-100</field>
                                          </shadow>
                                        </value>
                                        <value name="Y">
                                          <shadow type="logo_number">
                                            <field name="NUM">0</field>
                                          </shadow>
                                        </value>
                                        <next>
                                          <block type="turtle_setpen">
                                            <field name="MODE">PENDOWN</field>
                                            <next>
                                              <block type="draw_rect">
                                                <field name="FILL">TRUE</field>
                                                <field name="FN">STAMPRECT</field>
                                                <value name="WIDTH">
                                                  <shadow type="logo_number">
                                                    <field name="NUM">100</field>
                                                  </shadow>
                                                </value>
                                                <value name="HEIGHT">
                                                  <shadow type="logo_number">
                                                    <field name="NUM">100</field>
                                                  </shadow>
                                                  <block type="logo_arithmetic">
                                                    <field name="OP">MULTIPLY</field>
                                                    <value name="A">
                                                      <block type="logo_number">
                                                        <field name="NUM">100</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logo_arithmetic">
                                                        <field name="OP">DIVIDE</field>
                                                        <value name="A">
                                                          <block type="variables_get">
                                                            <field name="VAR" variabletype="">VOTESFOR1</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <block type="variables_get">
                                                            <field name="VAR" variabletype="">TOTALVOTES</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="turtle_setpen">
                                                    <field name="MODE">PENUP</field>
                                                    <next>
                                                      <block type="turtle_goto">
                                                        <value name="X">
                                                          <shadow type="logo_number">
                                                            <field name="NUM">100</field>
                                                          </shadow>
                                                        </value>
                                                        <value name="Y">
                                                          <shadow type="logo_number">
                                                            <field name="NUM">0</field>
                                                          </shadow>
                                                        </value>
                                                        <next>
                                                          <block type="turtle_setpen">
                                                            <field name="MODE">PENDOWN</field>
                                                            <next>
                                                              <block type="turtle_setpc_any">
                                                                <value name="COLOUR">
                                                                  <shadow type="logo_colour_picker">
                                                                    <field name="COLOUR">#8b008b</field>
                                                                  </shadow>
                                                                </value>
                                                                <next>
                                                                  <block type="draw_rect">
                                                                    <field name="FILL">TRUE</field>
                                                                    <field name="FN">STAMPRECT</field>
                                                                    <value name="WIDTH">
                                                                      <shadow type="logo_number">
                                                                        <field name="NUM">100</field>
                                                                      </shadow>
                                                                    </value>
                                                                    <value name="HEIGHT">
                                                                      <shadow type="logo_number">
                                                                        <field name="NUM">100</field>
                                                                      </shadow>
                                                                      <block type="logo_arithmetic">
                                                                        <field name="OP">MULTIPLY</field>
                                                                        <value name="A">
                                                                          <block type="logo_number">
                                                                            <field name="NUM">100</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <block type="logo_arithmetic">
                                                                            <field name="OP">DIVIDE</field>
                                                                            <value name="A">
                                                                              <block type="variables_get">
                                                                                <field name="VAR" variabletype="">VOTESFOR2</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="B">
                                                                              <block type="variables_get">
                                                                                <field name="VAR" variabletype="">TOTALVOTES</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
        <next>
          <block type="logo_defproc_nr">
            <mutation inputs="0"></mutation>
            <field name="NAME">SHOWRESULTS</field>
            <field name="COUNT">0</field>
            <statement name="CODE">
              <block type="turtle_setpc_any">
                <value name="COLOUR">
                  <shadow type="logo_colour_picker">
                    <field name="COLOUR">#008000</field>
                  </shadow>
                </value>
                <next>
                  <block type="draw_setfont">
                    <field name="NAME">HELVETICA</field>
                    <value name="SIZE">
                      <shadow type="logo_number">
                        <field name="NUM">16</field>
                      </shadow>
                    </value>
                    <next>
                      <block type="turtle_setpen">
                        <field name="MODE">PENUP</field>
                        <next>
                          <block type="turtle_goto">
                            <value name="X">
                              <shadow type="logo_number">
                                <field name="NUM">-100</field>
                              </shadow>
                            </value>
                            <value name="Y">
                              <shadow type="logo_number">
                                <field name="NUM">-25</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="turtle_setpen">
                                <field name="MODE">PENDOWN</field>
                                <next>
                                  <block type="draw_text">
                                    <value name="TEXT">
                                      <shadow type="logo_text">
                                        <field name="TEXT">Hello</field>
                                      </shadow>
                                      <block type="variables_get">
                                        <field name="VAR" variabletype="">CANDIDATE1</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="turtle_setpen">
                                        <field name="MODE">PENUP</field>
                                        <next>
                                          <block type="turtle_goto">
                                            <value name="X">
                                              <shadow type="logo_number">
                                                <field name="NUM">-100</field>
                                              </shadow>
                                            </value>
                                            <value name="Y">
                                              <shadow type="logo_number">
                                                <field name="NUM">-50</field>
                                              </shadow>
                                            </value>
                                            <next>
                                              <block type="turtle_setpen">
                                                <field name="MODE">PENDOWN</field>
                                                <next>
                                                  <block type="draw_text">
                                                    <value name="TEXT">
                                                      <shadow type="logo_text">
                                                        <field name="TEXT">Hello</field>
                                                      </shadow>
                                                      <block type="variables_get">
                                                        <field name="VAR" variabletype="">VOTESFOR1</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="turtle_setpen">
                                                        <field name="MODE">PENUP</field>
                                                        <next>
                                                          <block type="turtle_setpc_any">
                                                            <value name="COLOUR">
                                                              <shadow type="logo_colour_picker">
                                                                <field name="COLOUR">#8b008b</field>
                                                              </shadow>
                                                            </value>
                                                            <next>
                                                              <block type="turtle_setpen">
                                                                <field name="MODE">PENUP</field>
                                                                <next>
                                                                  <block type="turtle_goto">
                                                                    <value name="X">
                                                                      <shadow type="logo_number">
                                                                        <field name="NUM">100</field>
                                                                      </shadow>
                                                                    </value>
                                                                    <value name="Y">
                                                                      <shadow type="logo_number">
                                                                        <field name="NUM">-25</field>
                                                                      </shadow>
                                                                    </value>
                                                                    <next>
                                                                      <block type="turtle_setpen">
                                                                        <field name="MODE">PENDOWN</field>
                                                                        <next>
                                                                          <block type="draw_text">
                                                                            <value name="TEXT">
                                                                              <shadow type="logo_text">
                                                                                <field name="TEXT">Hello</field>
                                                                              </shadow>
                                                                              <block type="variables_get">
                                                                                <field name="VAR" variabletype="">CANDIDATE2</field>
                                                                              </block>
                                                                            </value>
                                                                            <next>
                                                                              <block type="turtle_setpen">
                                                                                <field name="MODE">PENUP</field>
                                                                                <next>
                                                                                  <block type="turtle_goto">
                                                                                    <value name="X">
                                                                                      <shadow type="logo_number">
                                                                                        <field name="NUM">100</field>
                                                                                      </shadow>
                                                                                    </value>
                                                                                    <value name="Y">
                                                                                      <shadow type="logo_number">
                                                                                        <field name="NUM">-50</field>
                                                                                      </shadow>
                                                                                    </value>
                                                                                    <next>
                                                                                      <block type="turtle_setpen">
                                                                                        <field name="MODE">PENDOWN</field>
                                                                                        <next>
                                                                                          <block type="draw_text">
                                                                                            <value name="TEXT">
                                                                                              <shadow type="logo_text">
                                                                                                <field name="TEXT">Hello</field>
                                                                                              </shadow>
                                                                                              <block type="variables_get">
                                                                                                <field name="VAR" variabletype="">VOTESFOR2</field>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </next>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
            <next>
              <block type="logo_call_nr">
                <mutation name="SETUP"></mutation>
                <next>
                  <block type="logo_call_nr">
                    <mutation name="GETVOTES"></mutation>
                    <next>
                      <block type="logo_call_nr">
                        <mutation name="SHOWRESULTS"></mutation>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </next>
  </block>
</xml>