{"id":2225,"date":"2017-06-12T12:29:55","date_gmt":"2017-06-12T11:29:55","guid":{"rendered":"http:\/\/www.ihaz.codes\/UoB\/?page_id=2225"},"modified":"2020-09-05T18:49:07","modified_gmt":"2020-09-05T17:49:07","slug":"array-bronze","status":"publish","type":"page","link":"http:\/\/www.ihaz.codes\/UoB\/tasks\/arrays\/array-bronze\/","title":{"rendered":"Array &#8211; challenge 1"},"content":{"rendered":"\n<div class=\"child_pages child_pages-thumbnail\">\n<div id=\"child_page-256\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"http:\/\/www.ihaz.codes\/UoB\/tasks\/arrays\/array-bronze\/peek-a-boo\/\">peek a boo<\/a><\/h4><div class=\"post_excerpt\">Enter the code below. The program should ask the user for a number (index) and then display &#8220;peek a boo&#8221; and the name of the person. Add the following &#8211; Add three more names to the list. Add line of code to ask[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-256\" -->\n\n<div id=\"child_page-18\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"http:\/\/www.ihaz.codes\/UoB\/tasks\/arrays\/array-bronze\/every-tom-dick-and-harry\/\">Every Tom, Dick and Harry<\/a><\/h4><div class=\"post_excerpt\">Enter the code below. The code will display all of the names in the list. It is not complete. You need to add the following - - Add 5 more names to the list. - change z &lt; ??? to be the size of the new list. - change print (names[????]) [read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-18\" -->\n\n<div id=\"child_page-2263\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"http:\/\/www.ihaz.codes\/UoB\/tasks\/arrays\/array-bronze\/vending-machine\/\">Vending machine<\/a><\/h4><div class=\"post_excerpt\">The code below is for a simple vending machine. Each item in the list represents a coin. If the coins 20p, 50p and two \u00a31 coins were added, the list would be coins = [20,50,100,100,0,0,0,0,0,0] Change the code below &#8211; change [read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-2263\" -->\n\n<div id=\"child_page-2267\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"http:\/\/www.ihaz.codes\/UoB\/tasks\/arrays\/array-bronze\/display-two-names\/\">Display names<\/a><\/h4><div class=\"post_excerpt\">Enter the code below. Make the following changes &#8211; Add two more names to the list. Add the code\u00a0print(myList[2] + &#8220;likes pizza&#8221;) Print out the person in position 4 of your list. Say that they like [read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-2267\" -->\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":15,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"class_list":["post-2225","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/pages\/2225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/comments?post=2225"}],"version-history":[{"count":3,"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/pages\/2225\/revisions"}],"predecessor-version":[{"id":2721,"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/pages\/2225\/revisions\/2721"}],"up":[{"embeddable":true,"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/pages\/15"}],"wp:attachment":[{"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/media?parent=2225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/categories?post=2225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}