{"id":38,"date":"2020-09-16T01:37:55","date_gmt":"2020-09-16T01:37:55","guid":{"rendered":"http:\/\/learnlearn.uk\/igcsecs\/?page_id=38"},"modified":"2020-09-16T01:37:55","modified_gmt":"2020-09-16T01:37:55","slug":"python-listsstringsloops-challenges","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/","title":{"rendered":"Python lists\/strings\/loops challenges"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Challenge 1<\/h2>\n<div class=\"tabcontent\">\n\n<p><strong>Challenge 1<\/strong><\/p>\n<p>Take this list of items:<\/p>\n<p>animals = [&#8216;cat&#8217;,&#8217;dog&#8217;,&#8217;mouse&#8221;,&#8217;hamster&#8217;]<\/p>\n<p>print out each item in the list using a for loop.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 2<\/strong><\/p>\n<p>Print out the first letter of each animal.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 3<\/strong><\/p>\n<p>Print out the last letter of each animal.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 4\u00a0<\/strong><\/p>\n<p>Print out the length of each animal.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 5<\/strong><\/p>\n<p>Print out all animals that are great in length of more than 3.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 6<\/strong><\/p>\n<p>Print out a reversed string for each animal.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 7<\/strong><\/p>\n<p>Print out the first letter of the first animal, second letter of the second, third letter of the third etc&#8230;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 8<\/strong><\/p>\n<p>Print out the middle letter of each animal.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 9<\/strong><\/p>\n<p>Print out each letter of each animal on a separate line.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 10<\/strong><\/p>\n<p>For each letter in each animal print out &#8216;consonant&#8217; or &#8216;vowel&#8217; depending on the letter type.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 11<\/strong><\/p>\n<p>Print out a list of all unique characters in the animal list<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Challenge 12<\/strong><\/p>\n<p>Print out a frequency table of all letters in the animal list<\/p>\n<p>Challenge 3<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Challenge 1 Take this list of items: animals = [&#8216;cat&#8217;,&#8217;dog&#8217;,&#8217;mouse&#8221;,&#8217;hamster&#8217;] print out each item in the list using a for loop. &nbsp; Challenge 2 Print out the first letter of each animal. &nbsp; Challenge 3 Print out the last letter of each animal. &nbsp; Challenge 4\u00a0 Print out the length of each animal. &nbsp; Challenge&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Python lists\/strings\/loops challenges<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python lists\/strings\/loops challenges | IGCSE Computer Science | Learnlearn.uk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python lists\/strings\/loops challenges | IGCSE Computer Science | Learnlearn.uk\" \/>\n<meta property=\"og:description\" content=\"Challenge 1 Take this list of items: animals = [&#8216;cat&#8217;,&#8217;dog&#8217;,&#8217;mouse&#8221;,&#8217;hamster&#8217;] print out each item in the list using a for loop. &nbsp; Challenge 2 Print out the first letter of each animal. &nbsp; Challenge 3 Print out the last letter of each animal. &nbsp; Challenge 4\u00a0 Print out the length of each animal. &nbsp; Challenge&hellip;&nbsp;Read More &raquo;Python lists\/strings\/loops challenges\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/\" \/>\n<meta property=\"og:site_name\" content=\"IGCSE Computer Science\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/\",\"url\":\"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/\",\"name\":\"Python lists\/strings\/loops challenges | IGCSE Computer Science | Learnlearn.uk\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#website\"},\"datePublished\":\"2020-09-16T01:37:55+00:00\",\"dateModified\":\"2020-09-16T01:37:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"IGCSE Computer Science Course\",\"item\":\"https:\/\/learnlearn.uk\/igcsecs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python lists\/strings\/loops challenges\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#website\",\"url\":\"https:\/\/learnlearn.uk\/igcsecs\/\",\"name\":\"IGCSE Computer Science\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/igcsecs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#organization\",\"name\":\"IGCSE Computer Science\",\"url\":\"https:\/\/learnlearn.uk\/igcsecs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/igcsecs\/wp-content\/uploads\/sites\/23\/2020\/08\/LearnLearnLogowhitenew.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/igcsecs\/wp-content\/uploads\/sites\/23\/2020\/08\/LearnLearnLogowhitenew.png\",\"width\":710,\"height\":98,\"caption\":\"IGCSE Computer Science\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python lists\/strings\/loops challenges | IGCSE Computer Science | Learnlearn.uk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/","og_locale":"en_GB","og_type":"article","og_title":"Python lists\/strings\/loops challenges | IGCSE Computer Science | Learnlearn.uk","og_description":"Challenge 1 Take this list of items: animals = [&#8216;cat&#8217;,&#8217;dog&#8217;,&#8217;mouse&#8221;,&#8217;hamster&#8217;] print out each item in the list using a for loop. &nbsp; Challenge 2 Print out the first letter of each animal. &nbsp; Challenge 3 Print out the last letter of each animal. &nbsp; Challenge 4\u00a0 Print out the length of each animal. &nbsp; Challenge&hellip;&nbsp;Read More &raquo;Python lists\/strings\/loops challenges","og_url":"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/","og_site_name":"IGCSE Computer Science","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/","url":"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/","name":"Python lists\/strings\/loops challenges | IGCSE Computer Science | Learnlearn.uk","isPartOf":{"@id":"https:\/\/learnlearn.uk\/igcsecs\/#website"},"datePublished":"2020-09-16T01:37:55+00:00","dateModified":"2020-09-16T01:37:55+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/igcsecs\/python-listsstringsloops-challenges\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"IGCSE Computer Science Course","item":"https:\/\/learnlearn.uk\/igcsecs\/"},{"@type":"ListItem","position":2,"name":"Python lists\/strings\/loops challenges"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/igcsecs\/#website","url":"https:\/\/learnlearn.uk\/igcsecs\/","name":"IGCSE Computer Science","description":"","publisher":{"@id":"https:\/\/learnlearn.uk\/igcsecs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/igcsecs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/igcsecs\/#organization","name":"IGCSE Computer Science","url":"https:\/\/learnlearn.uk\/igcsecs\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/igcsecs\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/igcsecs\/wp-content\/uploads\/sites\/23\/2020\/08\/LearnLearnLogowhitenew.png","contentUrl":"https:\/\/learnlearn.uk\/igcsecs\/wp-content\/uploads\/sites\/23\/2020\/08\/LearnLearnLogowhitenew.png","width":710,"height":98,"caption":"IGCSE Computer Science"},"image":{"@id":"https:\/\/learnlearn.uk\/igcsecs\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/igcsecs\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Challenge 1 Take this list of items: animals = [&#8216;cat&#8217;,&#8217;dog&#8217;,&#8217;mouse&#8221;,&#8217;hamster&#8217;] print out each item in the list using a for loop. &nbsp; Challenge 2 Print out the first letter of each animal. &nbsp; Challenge 3 Print out the last letter of each animal. &nbsp; Challenge 4\u00a0 Print out the length of each animal. &nbsp; Challenge&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/pages\/38"}],"collection":[{"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":1,"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/pages\/38\/revisions"}],"predecessor-version":[{"id":39,"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/pages\/38\/revisions\/39"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/media?parent=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}