<snapdata remixID="8949386"><project name="U3L4-BarGraph" app="Snap! 5.1, http://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAACtUlEQVR4Xu3SIQ7DQBAEwfjhRn74RQoKdoMhdXz2pFJf55zz8QiMBC4BjuR9+xMQoBCmAgKc8vtcgBqYCghwyu9zAWpgKiDAKb/PBaiBqYAAp/w+fxXgfd+f53noEcgCAsyEDhQBARY92ywgwEzoQBEQYNGzzQICzIQOFAEBFj3bLCDATOhAERBg0bPNAgLMhA4UAQEWPdssIMBM6EAREGDRs80CAsyEDhQBARY92ywgwEzoQBEQYNGzzQICzIQOFAEBFj3bLCDATOhAERBg0bPNAgLMhA4UAQEWPdssIMBM6EAREGDRs80CAsyEDhQBARY92ywgwEzoQBEQYNGzzQICzIQOFAEBFj3bLCDATOhAERBg0bPNAgLMhA4UAQEWPdssIMBM6EAREGDRs80CAsyEDhQBARY92ywgwEzoQBEQYNGzzQICzIQOFAEBFj3bLCDATOhAERBg0bPNAgLMhA4UAQEWPdssIMBM6EAREGDRs80CAsyEDhQBARY92ywgwEzoQBEQYNGzzQICzIQOFAEBFj3bLCDATOhAERBg0bPNAgLMhA4UAQEWPdssIMBM6EAREGDRs80CAsyEDhQBARY92ywgwEzoQBEQYNGzzQICzIQOFAEBFj3bLCDATOhAERBg0bPNAgLMhA4UAQEWPdssIMBM6EAREGDRs80CAsyEDhQBARY92ywgwEzoQBEQYNGzzQICzIQOFAEBFj3bLCDATOhAEXgVYPnQlsC/gAD1MBUQ4JTf5wLUwFRAgFN+nwtQA1MBAU75fS5ADUwFBDjl97kANTAVEOCU3+cC1MBUQIBTfp8LUANTAQFO+X0uQA1MBQQ45fe5ADUwFRDglN/nAtTAVECAU36fC1ADUwEBTvl9LkANTAUEOOX3uQA1MBUQ4JTf5wLUwFRAgFN+nwtQA1OBL7+AzreXRjcSAAAAAElFTkSuQmCC</thumbnail><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" volume="100" pan="0" lines="flat" ternary="true" codify="false" inheritance="false" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAQlElEQVR4Xu3XwW1dWRBDQTmjScEZKFRl4BQmpIETmIUB+zaPS3vhNosPIP63D38ECBAgQIDAHxf49sdf9CABAgQIECDwYYB9BAQIECBA4IGAAX6A7kkCBAgQIGCAfQMECBAgQOCBgAF+gO5JAgQIECBggH0DBAgQIEDggYABfoDuSQIECBAgYIB9AwQIECBA4IGAAX6A7kkCBAgQIGCAfQMECBAgQOCBgAF+gO5JAgQIECBggH0DBAgQIEDggYABfoDuSQIECBAgYIB9AwQIECBA4IGAAX6A7kkCBAgQIGCAfQMECBAgQOCBgAF+gO5JAgQIECBggH0DBAgQIEDggYABfoDuSQIECBAgYIB9AwQIECBA4IGAAX6A7kkCBAgQIGCAfQMECBAgQOCBgAF+gO5JAgQIECBggH0DBAgQIEDggYABfoDuSQIECBAgYIB9AwQIECBA4IGAAX6A7kkCBAgQIGCAfQMECBAgQOCBgAF+gO5JAgQIECBweoA/Pz9//Kzo6+vru6oIECBAgEBJwACX2pSFAAECBGYEDPBMVQ4lQIAAgZKAAS61KQsBAgQIzAgY4JmqHEqAAAECJQEDXGpTFgIECBCYETDAM1U5lAABAgRKAga41KYsBAgQIDAjYIBnqnIoAQIECJQEDHCpTVkIECBAYEbAAM9U5VACBAgQKAkY4FKbshAgQIDAjIABnqnKoQQIECBQEjDApTZlIUCAAIEZAQM8U5VDCRAgQKAkYIBLbcpCgAABAjMCBnimKocSIECAQEnAAJfalIUAAQIEZgQM8ExVDiVAgACBkoABLrUpCwECBAjMCBjgmaocSoAAAQIlAQNcalMWAgQIEJgRMMAzVTmUAAECBEoCBrjUpiwECBAgMCNggGeqcigBAgQIlAQMcKlNWQgQIEBgRsAAz1TlUAIECBAoCRjgUpuyECB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i63KRIAAAQLnBQzw+YocSIAAAQJFAQNcbFUmAgQIEDgvYIDPV+RAAgQIECgKGOBiqzIRIECAwHkBA3y+IgcSIECAQFHAABdblYkAAQIEzgsY4PMVOZAAAQIEigIGuNiqTAQIECBwXsAAn6/IgQQIECBQFDDAxVZlIkCAAIHzAgb4fEUOJECAAIGigAEutioTAQIECJwXMMDnK3IgAQIECBQFDHCxVZkIECBA4LyAAT5fkQMJECBAoChggIutykSAAAEC5wUM8PmKHEiAAAECRQEDXGxVJgIECBA4L2CAz1fkQAIECBAoChjgYqsyESBAgMB5gf8AQF/Glouxu0oAAAAASUVORK5CYII=</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Sprite" idx="1" x="-200" y="-90" heading="0" scale="1" volume="100" pan="0" rotation="1" draggable="true" hidden="true" costume="0" color="80,80,80,1" pen="tip" id="8"><costumes><list struct="atomic" id="9"></list></costumes><sounds><list struct="atomic" id="10"></list></sounds><blocks></blocks><variables></variables><scripts><comment x="27" y="10" w="261.2" collapsed="true">These blocks are given.  Explore them.</comment><script x="27" y="42"><block s="receiveKey"><l><option>space</option></l></block><block s="gotoXY"><l>0</l><l>0</l></block><block s="clear"></block><block s="up"></block><custom-block s="draw axes, x0: %n y0: %n horizontal length: %n vertical height: %n"><l>-200</l><l>-90</l><l>400</l><l>240</l></custom-block></script><script x="27" y="692.0000000000007"><custom-block s="Bar Graph, data: %l"><custom-block s="CO2 Emissions Data"></custom-block><comment w="90" collapsed="false">This block will label everthing like the names of the country and number s from the data table.</comment></custom-block></script><script x="27" y="846"><custom-block s="draw bars, bar width: %n max bar height: %n data: %l"><l>20</l><l>240</l><custom-block s="CO2 Emissions Data"></custom-block><comment w="90" collapsed="false">This block will only draw the x axis blocks so it will draw  bars with the names.</comment></custom-block></script><script x="27" y="1144.999999999998"><custom-block s="draw bar, label: %txt label size: %n width: %n height: %n"><l></l><l>10</l><l>1</l><l>56</l><comment w="90" collapsed="false">This block will label and the siz, height, width is according to the number inputted.</comment></custom-block></script><script x="27" y="1329.9999999999977"><custom-block s="draw bars, bar width: %n max bar height: %n data: %l"><l>10</l><l>240</l><custom-block s="CO2 Emissions Data"></custom-block><comment w="90" collapsed="false">This block will draw the bars for the x axis and say the names for the bars.</comment></custom-block></script><script x="27" y="1502.9999999999977"><custom-block s="label, text: %s size: %n direction: %n"><l></l><l></l><l></l><comment w="90" collapsed="false">This block will label any thing with the size and direction that is inputted in it.</comment></custom-block></script><comment x="193" y="48" w="90" collapsed="false">When the space key is pressed this block will clear the whole graph so a new graph can be drawn.</comment><comment x="489" y="231" w="90" collapsed="false">Name: Mir Fuad&#xD;Partner:Herschel&#xD;Duration:184 minutes &#xD;Description: The purpose of this project is to make a graph from a data table &#xD;Honorcode: I recieved help from kai creating the draw bar block</comment><script x="10" y="750.0000000000005"><custom-block s="label vertical axis, vertical height: %n data: %l"><l>240</l><custom-block s="CO2 Emissions Data"></custom-block><comment w="90" collapsed="false">This block will draw the tick mark for the number right next to the graph.</comment></custom-block></script><script x="66" y="533.0000000000008"><block s="doSetVar"><l>data list</l><custom-block s="CO2 Emissions Data"><comment w="90" collapsed="false">This block will initialize the co2 emissions data </comment></custom-block></block></script></scripts></sprite><watcher var="data list" style="normal" x="10" y="10" color="243,118,29" hidden="true"/><watcher var="largest value" style="normal" x="10" y="183.000002" color="243,118,29" hidden="true"/><watcher var="distance" style="normal" x="10" y="276.000004" color="243,118,29" hidden="true"/><watcher var="x-origin" style="normal" x="10" y="297.000006" color="243,118,29" hidden="true"/><watcher var="number from data record" style="normal" x="326" y="8.00000799999998" color="243,118,29" hidden="true"/><watcher var="y-origin" style="normal" x="10" y="318.000008" color="243,118,29" hidden="true"/></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="Bar Graph, data: %&apos;data list&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><custom-block s="draw axes, x0: %n y0: %n horizontal length: %n vertical height: %n"><l>-200</l><l>-90</l><l>400</l><l>240</l></custom-block><block s="changeXPosition"><l>10</l></block><custom-block s="draw bars, bar width: %n max bar height: %n data: %l"><l>20</l><l>240</l><block var="data list"/></custom-block><custom-block s="label vertical axis, vertical height: %n data: %l"><l>240</l><block var="data list"/></custom-block></script></block-definition><block-definition s="data-record, label: %&apos;label&apos; value: %&apos;value&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="label"/><block var="value"/></list></block></block></script></block-definition><block-definition s="label from data-record: %&apos;data-record&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="data-record"/></block></block></script></block-definition><block-definition s="value from data-record: %&apos;data-record&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>2</l><block var="data-record"/></block></block></script></block-definition><block-definition s="label %&apos;text&apos; of size %&apos;size&apos;" type="command" category="pen"><comment x="0" y="0" w="90" collapsed="false">LABEL will stamp text on the stage at the given font size. The direction of the text is the direction the sprite is facing, and color will match the pen color.</comment><header></header><code></code><translations></translations><inputs><input type="%txt">Hello!</input><input type="%n">12</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>text</l><l>size</l></list><l>var stage = this.parentThatIsA(StageMorph),&#xD;    context = stage.penTrails().getContext(&apos;2d&apos;),&#xD;    rotation = radians(this.direction() - 90),&#xD;    trans = new Point(&#xD;      this.center().x - stage.left(),&#xD;      this.center().y - stage.top()&#xD;    ),&#xD;    isWarped = this.Warped,&#xD;    len,&#xD;    pos;&#xD;&#xD;if (isWarped) {endWarp(); }&#xD;context.save();&#xD;context.font = size + &apos;px monospace&apos;;&#xD;context.textAlign = &apos;left&apos;;&#xD;context.textBaseline = &apos;alphabetic&apos;;&#xD;context.fillStyle = this.color.toString();&#xD;len = context.measureText(text).width;&#xD;trans = trans.multiplyBy(1 / stage.scale);&#xD;context.translate(trans.x, trans.y);&#xD;context.rotate(rotation);&#xD;context.fillText(text, 0, 0);&#xD;context.translate(-trans.x, -trans.y);&#xD;context.restore();&#xD;pos = new Point(&#xD;  len * Math.sin(radians(this.direction())),&#xD;  len * Math.cos(radians(this.direction())));&#xD;pos = pos.add(new Point(this.xPosition(), this.yPosition()));&#xD;this.gotoXY(pos.x, pos.y, false);&#xD;this.changed();&#xD;if (isWarped) {this.startWarp(); }&#xD;stage.changed();</l></block><list><block var="text"/><block var="size"/></list></block></script></block-definition><block-definition s="map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>mapone</l><l>mapmany</l></list></block><block s="doSetVar"><l>mapone</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="evaluate"><block var="mapone"/><list><block s="reportCDR"><block var="data"/></block></list></block></block></block></script><list><l>data</l></list></block></block><block s="doSetVar"><l>mapmany</l><block s="reifyScript"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportListItem"><l>1</l><block var="data lists"/></block></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></block><block s="evaluate"><block var="mapmany"/><list><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></list></block></block></block></script><list><l>data lists</l></list></block></block><block s="doIfElse"><custom-block s="empty? %l"><block s="reportCDR"><block var="lists"/></block></custom-block><script><block s="doReport"><block s="evaluate"><block var="mapone"/><list><block s="reportListItem"><l>1</l><block var="lists"/></block></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="mapmany"/><list><block var="lists"/></list></block></block></script></block></script></block></script></block-definition><block-definition s="empty? %&apos;data&apos;" type="predicate" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="keep items such that %&apos;pred&apos; from %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script><script><block s="doReport"><custom-block s="keep items such that %predRing from %l"><block var="pred"/><block s="reportCDR"><block var="data"/></block></custom-block></block></script></block></script></block></script></block-definition><block-definition s="combine with %&apos;function&apos; items of %&apos;data&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="data"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="data"/></block></block></script></block><block s="doReport"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="combine with %repRing items of %l"><block var="function"/><block s="reportCDR"><block var="data"/></block></custom-block></list></block></block></script></block></script></block-definition><block-definition s="if %&apos;test&apos; then %&apos;true&apos; else %&apos;false&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%anyUE"></input><input type="%anyUE"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doReport"><block s="evaluate"><block var="true"/><list></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="false"/><list></list></block></block></script></block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>step</l><l>tester</l></list></block><block s="doIfElse"><block s="reportGreaterThan"><block var="start"/><block var="end"/></block><script><block s="doSetVar"><l>step</l><l>-1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportLessThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>step</l><l>1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportGreaterThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doUntil"><block s="evaluate"><block var="tester"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block><block s="doChangeVar"><l>i</l><block var="step"/></block></script></block></script></block-definition><block-definition s="join words %&apos;words&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doIf"><custom-block s="empty? %l"><block s="reportCDR"><block var="words"/></block></custom-block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="words"/></block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>1</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>2</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="words"/></block><block s="reportCDR"><block s="reportCDR"><block var="words"/></block></block></block></custom-block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="words"/></block><l> </l><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></list></block></block></script></block></script><scripts><script x="229.00000300000002" y="196.77778077777774"><block s="reportJoinWords"><list><l></l><l></l></list></block></script></scripts></block-definition><block-definition s="list $arrowRight sentence %&apos;data&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><custom-block s="join words %mult%txt"><block var="data"/></custom-block></block></script></block></script></block-definition><block-definition s="sentence $arrowRight list %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="text"/><l><option>whitespace</option></l></block></block></script></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doRun"><block var="action"/><list></list></block></script><list><l>cont</l></list></block></block><custom-block s="ignore %s"><l>3</l></custom-block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">catchtag</input></inputs><script><block s="doRun"><block var="cont"/><list></list></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;value&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doReport"><block s="evaluate"><block var="value"/><list></list></block></block></script><list><l>cont</l></list></block></block></script></block-definition><block-definition s="throw %&apos;tag&apos; %&apos;value&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">catchtag</input><input type="%s"></input></inputs><script><block s="doRun"><block var="tag"/><list><block var="value"/></list></block></script></block-definition><block-definition s="for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%l"></input><input type="%cs"></input></inputs><script><block s="doUntil"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block s="doRun"><block var="action"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block></script></block></script></block-definition><block-definition s="if %&apos;test&apos; do %&apos;action&apos; and pause all $pause-1-255-220-0" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>breakpoint</l></list></block><block s="doIf"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doSetVar"><l>breakpoint</l><block var="test"/></block><block s="doShowVar"><l>breakpoint</l></block><block s="doRun"><block var="action"/><list></list></block><block s="doPauseAll"></block><block s="doHideVar"><l></l></block></script></block></script></block-definition><block-definition s="word $arrowRight list %&apos;word&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportTextSplit"><block var="word"/><l><option>letter</option></l></block></block></script></block></script></block-definition><block-definition s="ignore %&apos;x&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs></block-definition><block-definition s="tell %&apos;sprite&apos; to %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">Sprite</input><input type="%cs"></input></inputs><script><block s="doRun"><block s="reportAttributeOf"><block var="action"/><block var="sprite"/></block><list></list></block></script></block-definition><block-definition s="ask %&apos;sprite&apos; for %&apos;expression&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">Sprite</input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportAttributeOf"><block var="expression"/><block var="sprite"/></block><list></list></block></block></script></block-definition><block-definition s="list $arrowRight word %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><block s="reportJoinWords"><block var="list"/></block></block></script></block></script></block-definition><block-definition s="min of list %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="combine with %repRing items of %l"><block s="reifyReporter"><autolambda><custom-block s="min of %s , %s"><l></l><l></l></custom-block></autolambda><list></list></block><block var="list"/></custom-block></block></script></block-definition><block-definition s="max of list %&apos;list&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="combine with %repRing items of %l"><block s="reifyReporter"><autolambda><custom-block s="max of %s , %s"><l></l><l></l></custom-block></autolambda><list></list></block><block var="list"/></custom-block></block></script></block-definition><block-definition s="min of %&apos;a&apos; , %&apos;b&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportLessThan"><block var="a"/><block var="b"/></block><script><block s="doReport"><block var="a"/></block></script><script><block s="doReport"><block var="b"/></block></script></block></script></block-definition><block-definition s="max of %&apos;a&apos; , %&apos;b&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportGreaterThan"><block var="a"/><block var="b"/></block><script><block s="doReport"><block var="a"/></block></script><script><block s="doReport"><block var="b"/></block></script></block></script></block-definition><block-definition s="CO2 Emissions Data" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportNewList"><list><custom-block s="data-record, label: %txt value: %n"><l>China</l><l>8715</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>USA</l><l>5491</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Russia</l><l>1788</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>India</l><l>1726</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Japan</l><l>1181</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Germany</l><l>748</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Iran</l><l>624</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>S. Korea</l><l>611</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Canada</l><l>553</l></custom-block></list></block></block></script></block-definition><block-definition s="CO2 Emissions per capita Data" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportNewList"><list><custom-block s="data-record, label: %txt value: %n"><l>China</l><l>6.52</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>USA</l><l>17.62</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Russia</l><l>12.55</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>India</l><l>1.45</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Japan</l><l>9.26</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Germany</l><l>9.19</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Iran</l><l>8.02</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>S. Korea</l><l>12.53</l></custom-block><custom-block s="data-record, label: %txt value: %n"><l>Canada</l><l>16.24</l></custom-block></list></block></block></script></block-definition><block-definition s="label, text: %&apos;text&apos; size: %&apos;size&apos; direction: %&apos;direction&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="up"></block><block s="setSize"><l>1</l></block><block s="doFaceTowards"><block var="direction"/></block><custom-block s="label %txt of size %n"><block var="text"/><block var="size"/></custom-block></script></block-definition><block-definition s="draw bar, label: %&apos;label&apos; label size: %&apos;label size&apos; width: %&apos;width&apos; height: %&apos;height&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="setHeading"><l>0</l></block><custom-block s="label, text: %s size: %n direction: %n"><block var="label"/><block var="label size"/><l>0</l></custom-block><block s="forward"><l>10</l></block><block s="down"></block><block s="setSize"><block var="width"/></block><block s="forward"><block var="height"/></block></script></block-definition><block-definition s="draw axes, x0: %&apos;x0&apos; y0: %&apos;y0&apos; horizontal length: %&apos;horiz length&apos; vertical height: %&apos;vert height&apos;" type="command" category="pen"><comment w="90" collapsed="false">This block sets x and y and plots the points.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doSetVar"><l>x-origin</l><block var="x0"/></block><block s="doSetVar"><l>y-origin</l><block var="y0"/></block><block s="setSize"><l>1</l></block><block s="gotoXY"><block var="x0"/><block var="y0"/></block><block s="down"></block><block s="setHeading"><l>90</l></block><block s="forward"><block var="horiz length"/></block><block s="gotoXY"><block var="x0"/><block var="y0"/></block><block s="setHeading"><l>0</l></block><block s="forward"><block var="vert height"/></block><block s="gotoXY"><block var="x0"/><block var="y0"/></block><block s="up"></block></script><scripts><script x="258.5498056874999" y="112.000001"><block var="x0"/></script></scripts></block-definition><block-definition s="label vertical axis, vertical height: %&apos;vert height&apos; data: %&apos;data list&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="setSize"><l>1</l></block><block s="doSetVar"><l>number from data record</l><block s="reportNewList"><list></list></block></block><block s="gotoXY"><block var="x-origin"/><block var="y-origin"/></block><block s="doForEach"><l>item</l><block var="data list"/><script><block s="doAddToList"><block s="reportListItem"><l>2</l><block var="item"/></block><block var="number from data record"/></block></script></block><block s="doFor"><l>i</l><l>0</l><block s="reportListLength"><block var="data list"/></block><script><block s="setXPosition"><block s="reportDifference"><block var="x-origin"/><l>30</l></block></block><block s="setHeading"><l>0</l></block><block s="forward"><block s="reportQuotient"><block var="vert height"/><block s="reportSum"><block s="reportListLength"><block var="data list"/></block><l>1</l></block></block></block><block s="setHeading"><l>90</l></block><custom-block s="label %txt of size %n"><block s="reportRound"><block s="reportProduct"><block s="reportSum"><block var="i"/><l>1</l></block><block s="reportQuotient"><custom-block s="max of list %l"><block var="number from data record"/></custom-block><block s="reportSum"><block s="reportListLength"><block var="data list"/></block><l>1</l></block></block></block></block><l>10</l></custom-block><block s="setHeading"><l>90</l></block><block s="setXPosition"><block s="reportDifference"><block var="x-origin"/><l>5</l></block></block><block s="down"></block><block s="forward"><l>10</l></block><block s="up"></block></script></block></script></block-definition><block-definition s="draw bars, bar width: %&apos;width&apos; max bar height: %&apos;max bar height&apos; data: %&apos;data list&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input><input type="%l"></input></inputs><script><block s="doSetVar"><l>distance</l><l>0</l></block><block s="doSetVar"><l>largest value</l><l>0</l></block><custom-block s="for each %upvar of %l %cs"><l>item</l><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="value from data-record: %l"><l/></custom-block></autolambda><list></list></block><list><block var="data list"/></list></custom-block><script><block s="doIf"><block s="reportGreaterThan"><block var="item"/><block var="largest value"/></block><script><block s="doSetVar"><l>largest value</l><block var="item"/></block></script></block></script></custom-block><block s="up"></block><block s="setSize"><block var="width"/></block><block s="gotoXY"><block var="x-origin"/><block var="y-origin"/></block><block s="changeXPosition"><l>30</l></block><custom-block s="for each %upvar of %l %cs"><l>item</l><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="label from data-record: %l"><l/></custom-block></autolambda><list></list></block><list><block var="data list"/></list></custom-block><script><block s="setYPosition"><block s="reportDifference"><block var="y-origin"/><l>70</l></block></block><custom-block s="label %txt of size %n"><block var="item"/><l>12</l></custom-block><block s="changeXPosition"><l>30</l></block></script></custom-block><block s="setSize"><l>20</l></block><block s="gotoXY"><block var="x-origin"/><block var="y-origin"/></block><custom-block s="for each %upvar of %l %cs"><l>item</l><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="value from data-record: %l"><l/></custom-block></autolambda><list></list></block><list><block var="data list"/></list></custom-block><script><block s="setSize"><block var="width"/></block><block s="up"></block><block s="changeXPosition"><l>30</l></block><block s="down"></block><block s="changeYPosition"><block s="reportProduct"><block var="max bar height"/><block s="reportQuotient"><block var="item"/><block var="largest value"/></block></block></block><block s="up"></block><block s="setYPosition"><block var="y-origin"/></block></script></custom-block></script></block-definition><block-definition s="set origin x: %&apos;x&apos; y: %&apos;y&apos;" type="command" category="motion"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doSetVar"><l>x-origin</l><block var="x"/></block><block s="doSetVar"><l>y-origin</l><block var="y"/></block><block s="gotoXY"><block var="x"/><block var="y"/></block></script></block-definition><block-definition s="Country-GDP-Population Data" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportNewList"><list><block s="reportNewList"><list><l>China</l><l>13421985588615</l><l>1336718015</l></list></block><block s="reportNewList"><list><l>USA</l><l>15507135407358</l><l>311050977</l></list></block><block s="reportNewList"><list><l>Russia</l><l>3121925049784</l><l>138739892</l></list></block><block s="reportNewList"><list><l>India</l><l>5806731299998</l><l>1189172906</l></list></block><block s="reportNewList"><list><l>Japan</l><l>4367871360438</l><l>127469543</l></list></block><block s="reportNewList"><list><l>Germany</l><l>3338715757320</l><l>81471834</l></list></block><block s="reportNewList"><list><l>Iran</l><l>1243922783400</l><l>77891220</l></list></block><block s="reportNewList"><list><l>S. Korea</l><l>1415591465995</l><l>48754657</l></list></block><block s="reportNewList"><list><l>Canada</l><l>1374291306176</l><l>34030589</l></list></block></list></block></block></script></block-definition></blocks><variables><variable name="x-origin"><l>-200</l></variable><variable name="y-origin"><l>-90</l></variable><variable name="data list"><list id="1151"><item><list struct="atomic" id="1152">China,8715</list></item><item><list struct="atomic" id="1153">USA,5491</list></item><item><list struct="atomic" id="1154">Russia,1788</list></item><item><list struct="atomic" id="1155">India,1726</list></item><item><list struct="atomic" id="1156">Japan,1181</list></item><item><list struct="atomic" id="1157">Germany,748</list></item><item><list struct="atomic" id="1158">Iran,624</list></item><item><list struct="atomic" id="1159">S. Korea,611</list></item><item><list struct="atomic" id="1160">Canada,553</list></item></list></variable><variable name="largest value"><l>8715</l></variable><variable name="distance"><l>0</l></variable><variable name="number from data record"><list struct="atomic" id="1161">8715,5491,1788,1726,1181,748,624,611,553</list></variable></variables></project><media name="U3L4-BarGraph" app="Snap! 5.1, http://snap.berkeley.edu" version="1"></media></snapdata>