{"id":1122,"date":"2019-02-08T22:26:31","date_gmt":"2019-02-08T22:26:31","guid":{"rendered":"http:\/\/learnlearn.uk\/python\/?page_id=1122"},"modified":"2019-02-11T14:13:08","modified_gmt":"2019-02-11T14:13:08","slug":"python-higher-lower-card-game-tutorial","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/","title":{"rendered":"Python Higher or Lower Card Game Tutorial"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Introduction<\/h2>\n<div class=\"tabcontent\">\n\n<h2>Python Higher or Lower Card Game Tutorial<\/h2>\n<p>In this tutorial we walk through the steps for how to create a simple higher or lower card game using Python 3.<\/p>\n<ul>\n<li>How to create a deck of cards and shuffle them<\/li>\n<li>How to check for valid user inputs<\/li>\n<li>How to keep score<\/li>\n<li>How to repeatedly picks a card until the user guesses incorrectly.<\/li>\n<\/ul>\n<p>The tutorial is great for Python beginners, as it reviews a number of beginner concepts, in an easy to follow manner.<\/p>\n<ul>\n<li>How to use 2 Dimensional Lists<\/li>\n<li>How to use nest for loops<\/li>\n<li>How user input \/ print<\/li>\n<li>How to improve program robustness using while loops<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Tutorial Video<\/h2>\n<div class=\"tabcontent\">\n\n<p><a href=\"https:\/\/drive.google.com\/open?id=1W-cuhPV2RKCrroSzPJqe8lCuYH_d9VtM\">Can&#8217;t access YouTube? Click here for the Google Drive Version<\/a><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/h0ZpI_umGjo\" width=\"800\" height=\"600\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n<\/div><h2 class=\"tabtitle\">Full Code<\/h2>\n<div class=\"tabcontent\">\n\n<p><script src=\"https:\/\/gist.github.com\/richardbwest\/b38db29d305faafb90b4bd6b4946fd00.js\"><\/script><\/p>\n\n<\/div><h2 class=\"tabtitle\">Improvements<\/h2>\n<div class=\"tabcontent\">\n\n<p>Finished the tutorial?<\/p>\n<p>Here are some improvements you can make to the game!<\/p>\n<p><a href=\"https:\/\/learnlearn.uk\/python\/ascii-art\/\">Add some ASCII Art<\/a><\/p>\n<p><a href=\"https:\/\/learnlearn.uk\/python\/python-csv-files-tutorial\/\">Save the user&#8217;s score to a CSV file<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Python Higher or Lower Card Game Tutorial In this tutorial we walk through the steps for how to create a simple higher or lower card game using Python 3. How to create a deck of cards and shuffle them How to check for valid user inputs How to keep score How to repeatedly picks a&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Python Higher or Lower Card Game Tutorial<\/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":0,"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 Higher or Lower Card Game Tutorial - Python<\/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\/python\/python-higher-lower-card-game-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Higher or Lower Card Game Tutorial - Python\" \/>\n<meta property=\"og:description\" content=\"Python Higher or Lower Card Game Tutorial In this tutorial we walk through the steps for how to create a simple higher or lower card game using Python 3. How to create a deck of cards and shuffle them How to check for valid user inputs How to keep score How to repeatedly picks a&hellip;&nbsp;Read More &raquo;Python Higher or Lower Card Game Tutorial\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"Python\" \/>\n<meta property=\"article:modified_time\" content=\"2019-02-11T14:13:08+00:00\" \/>\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\/python\/python-higher-lower-card-game-tutorial\/\",\"url\":\"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/\",\"name\":\"Python Higher or Lower Card Game Tutorial - Python\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/python\/#website\"},\"datePublished\":\"2019-02-08T22:26:31+00:00\",\"dateModified\":\"2019-02-11T14:13:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Python Unit Home\",\"item\":\"https:\/\/learnlearn.uk\/python\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Higher or Lower Card Game Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/python\/#website\",\"url\":\"https:\/\/learnlearn.uk\/python\/\",\"name\":\"Python\",\"description\":\"Programming\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/python\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/python\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/python\/#organization\",\"name\":\"Python\",\"url\":\"https:\/\/learnlearn.uk\/python\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/python\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2019\/03\/LearnLearnLogowhite.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2019\/03\/LearnLearnLogowhite.png\",\"width\":710,\"height\":98,\"caption\":\"Python\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/python\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Higher or Lower Card Game Tutorial - Python","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\/python\/python-higher-lower-card-game-tutorial\/","og_locale":"en_GB","og_type":"article","og_title":"Python Higher or Lower Card Game Tutorial - Python","og_description":"Python Higher or Lower Card Game Tutorial In this tutorial we walk through the steps for how to create a simple higher or lower card game using Python 3. How to create a deck of cards and shuffle them How to check for valid user inputs How to keep score How to repeatedly picks a&hellip;&nbsp;Read More &raquo;Python Higher or Lower Card Game Tutorial","og_url":"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/","og_site_name":"Python","article_modified_time":"2019-02-11T14:13:08+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/","url":"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/","name":"Python Higher or Lower Card Game Tutorial - Python","isPartOf":{"@id":"https:\/\/learnlearn.uk\/python\/#website"},"datePublished":"2019-02-08T22:26:31+00:00","dateModified":"2019-02-11T14:13:08+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/python\/python-higher-lower-card-game-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Python Unit Home","item":"https:\/\/learnlearn.uk\/python\/"},{"@type":"ListItem","position":2,"name":"Python Higher or Lower Card Game Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/python\/#website","url":"https:\/\/learnlearn.uk\/python\/","name":"Python","description":"Programming","publisher":{"@id":"https:\/\/learnlearn.uk\/python\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/python\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/python\/#organization","name":"Python","url":"https:\/\/learnlearn.uk\/python\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/python\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2019\/03\/LearnLearnLogowhite.png","contentUrl":"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2019\/03\/LearnLearnLogowhite.png","width":710,"height":98,"caption":"Python"},"image":{"@id":"https:\/\/learnlearn.uk\/python\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/python\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Python Higher or Lower Card Game Tutorial In this tutorial we walk through the steps for how to create a simple higher or lower card game using Python 3. How to create a deck of cards and shuffle them How to check for valid user inputs How to keep score How to repeatedly picks a&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/pages\/1122"}],"collection":[{"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/comments?post=1122"}],"version-history":[{"count":6,"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/pages\/1122\/revisions"}],"predecessor-version":[{"id":1129,"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/pages\/1122\/revisions\/1129"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/media?parent=1122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}