{"id":1473,"date":"2019-09-20T15:14:10","date_gmt":"2019-09-20T15:14:10","guid":{"rendered":"http:\/\/holypython.com\/?page_id=1473"},"modified":"2024-04-04T08:04:37","modified_gmt":"2024-04-04T08:04:37","slug":"exercise-2-python-variables","status":"publish","type":"page","link":"https:\/\/holypython.com\/beginner-python-exercises\/exercise-2-python-variables\/","title":{"rendered":"Exercise 2: Variables"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1473\" class=\"elementor elementor-1473\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-cc8d4b1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"cc8d4b1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8f175d5\" data-id=\"8f175d5\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cf644f7 elementor-widget elementor-widget-html\" data-id=\"cf644f7\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t    <link rel=\"stylesheet\" href=\"\/_static\/bootstrap.min.css\" type=\"text\/css\" \/>\r\n    <link rel=\"stylesheet\" href=\"\/_static\/activecode.css\" type=\"text\/css\" \/>\r\n    <link rel=\"stylesheet\" href=\"\/_static\/codemirror.css\" type=\"text\/css\" \/>\r\n    <link rel=\"stylesheet\" href=\"\/_static\/runestone-custom-sphinx-bootstrap.css\" type=\"text\/css\" \/>\r\n    <link rel=\"stylesheet\" href=\"\/_static\/jquery-ui-1.10.3.custom.min.css\" type=\"text\/css\" \/>\r\n\r\n    <script type=\"text\/javascript\">\r\n      var DOCUMENTATION_OPTIONS = {\r\n        URL_ROOT:    '..\/',\r\n        VERSION:     '0.0',\r\n        COLLAPSE_INDEX: false,\r\n        FILE_SUFFIX: '.html',\r\n        HAS_SOURCE:  true,\r\n        SOURCELINK_SUFFIX: '.txt' \r\n      };\r\n    <\/script>\r\n    \r\n    <script type=\"text\/javascript\" src=\"\/_static\/runestonebase.js\"><\/script>\r\n    <script type=\"text\/javascript\" src=\"\/_static\/jquery.js\"><\/script>\r\n    <script type=\"text\/javascript\" src=\"\/_static\/codemirror.js\"><\/script>\r\n    <script type=\"text\/javascript\" src=\"\/_static\/javascript.js\"><\/script>\r\n    <script type=\"text\/javascript\" src=\"\/_static\/activecode.js\"><\/script>\r\n    <script type=\"text\/javascript\" src=\"\/_static\/python.js\"><\/script>\r\n    <script type=\"text\/javascript\" src=\"\/_static\/skulpt.min.js\"><\/script>\r\n    <script type=\"text\/javascript\" src=\"\/_static\/skulpt-stdlib.js\"><\/script>\r\n    <script type=\"text\/javascript\" src=\"\/_static\/jquery-ui-1.10.3.custom.min.js\"><\/script>\r\n\r\n<script type=\"text\/javascript\">\r\n  eBookConfig = {};\r\n\r\n\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7b3505e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7b3505e\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-911ad58\" data-id=\"911ad58\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2cab83e elementor-widget elementor-widget-menu-anchor\" data-id=\"2cab83e\" data-element_type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"ex1\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f66ec0 elementor-widget elementor-widget-heading\" data-id=\"8f66ec0\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Python Variable Exercises<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bdf80c6 elementor-widget elementor-widget-text-editor\" data-id=\"bdf80c6\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Let&#8217;s check out some exercises that will help you understand <b>Variables in Python<\/b>\u00a0better.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fcabcda elementor-widget elementor-widget-heading\" data-id=\"fcabcda\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Exercise 2-a<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-18a273e elementor-widget elementor-widget-html\" data-id=\"18a273e\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div data-childcomponent=\"beg2a\" class=\"explainer ac_section alert alert-warning\">\r\n\r\n<p style=\"font-size:14px;\">Below is a good example of mixing numbers and text inside the print() function<\/p>\r\n<\/br>\r\n<p style=\"font-size:14px;\">Assign: 3 to variable glass_of_water.<\/p>\r\n\r\n\r\n\r\n<textarea data-component=\"activecode\" id=beg2a data-lang=\"python\"    data-timelimit=25000   data-audio=''     >\r\n#Type here. Assign a number to the variable: glass_of_water\r\n\r\nglass_of_water=\r\n\r\nprint(\"I drank\", glass_of_water, \"glasses of water today.\")\r\n\r\n====\r\n\r\nfrom unittest.gui import TestCaseGui\r\n\r\nclass myTests(TestCaseGui):\r\n    def testOne(self):\r\n        self.assertEqual(glass_of_water,3,\"variable checks\")\r\n\r\nmyTests().main()\r\n\r\n<\/textarea>\r\n<\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ad41bb4 elementor-section-content-middle elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"ad41bb4\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7c5ae63c\" data-id=\"7c5ae63c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-19759d1b elementor-widget elementor-widget-toggle\" data-id=\"19759d1b\" data-element_type=\"widget\" data-widget_type=\"toggle.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-toggle\">\n\t\t\t\t\t\t\t<div class=\"elementor-toggle-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-4271\" class=\"elementor-tab-title\" data-tab=\"1\" role=\"button\" aria-controls=\"elementor-tab-content-4271\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon elementor-toggle-icon-right\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-opened\"><i class=\"elementor-toggle-icon-opened fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-toggle-title\" tabindex=\"0\">Hint 1<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<div id=\"elementor-tab-content-4271\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"region\" aria-labelledby=\"elementor-tab-title-4271\"><p>You can simply assign a number to the variable glass_of_water by typing it on the left side of the equal sign and the number on the right side of it.<\/p><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-toggle-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-4272\" class=\"elementor-tab-title\" data-tab=\"2\" role=\"button\" aria-controls=\"elementor-tab-content-4272\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon elementor-toggle-icon-right\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-opened\"><i class=\"elementor-toggle-icon-opened fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-toggle-title\" tabindex=\"0\">Hint 2<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<div id=\"elementor-tab-content-4272\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"2\" role=\"region\" aria-labelledby=\"elementor-tab-title-4272\"><p>Number on the right side doesn&#8217;t have to be in quotes.<\/p><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-toggle-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-4273\" class=\"elementor-tab-title\" data-tab=\"3\" role=\"button\" aria-controls=\"elementor-tab-content-4273\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon elementor-toggle-icon-right\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-opened\"><i class=\"elementor-toggle-icon-opened fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-toggle-title\" tabindex=\"0\">Solution<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<div id=\"elementor-tab-content-4273\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"3\" role=\"region\" aria-labelledby=\"elementor-tab-title-4273\"><pre>glass_of_water = 3<\/pre><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-83ff00a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"83ff00a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-689b3b2\" data-id=\"689b3b2\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9bc6445 elementor-widget elementor-widget-menu-anchor\" data-id=\"9bc6445\" data-element_type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"ex2\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e2cbd46 elementor-widget elementor-widget-heading\" data-id=\"e2cbd46\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Exercise 2-b<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-52f7237 elementor-widget elementor-widget-html\" data-id=\"52f7237\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div data-childcomponent=\"beg2b\" class=\"explainer ac_section alert alert-warning\">\r\n\r\n<p style=\"font-size:14px;\">Let's try to see what happens after assigning a new value to our variable. Note that program gets executed line by line.<\/p>\r\n<\/br><p style=\"font-size:14px;\">Place the variable: glass_of_water inside the print function and observe what happens.<\/p>\r\n\r\n\r\n<textarea data-component=\"activecode\" id=beg2b data-lang=\"python\"    data-timelimit=25000   data-audio=''     >\r\n#Fill the print function so it prints glass_of_water\r\n\r\nglass_of_water=3\r\n\r\nglass_of_water=glass_of_water + 1\r\n\r\n\r\nprint()\r\n\r\n====\r\n\r\nfrom unittest.gui import TestCaseGui\r\n\r\nclass myTests(TestCaseGui):\r\n    def testOne(self):\r\n        self.assertEqual(glass_of_water,4,\"variable checks\")\r\n\r\nmyTests().main()\r\n\r\n\r\n<\/textarea>\r\n<\/div>\r\n\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-94c96dd elementor-section-content-middle elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"94c96dd\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-82a69a9\" data-id=\"82a69a9\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9f26937 elementor-widget elementor-widget-toggle\" data-id=\"9f26937\" data-element_type=\"widget\" data-widget_type=\"toggle.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-toggle\">\n\t\t\t\t\t\t\t<div class=\"elementor-toggle-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-1661\" class=\"elementor-tab-title\" data-tab=\"1\" role=\"button\" aria-controls=\"elementor-tab-content-1661\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon elementor-toggle-icon-right\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-opened\"><i class=\"elementor-toggle-icon-opened fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-toggle-title\" tabindex=\"0\">Hint 1<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<div id=\"elementor-tab-content-1661\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"region\" aria-labelledby=\"elementor-tab-title-1661\"><p>Alternatively, you can use &#8220;<code>+=<\/code>&#8221; operator. It&#8217;s often a more efficient way of incrementing variables.<\/p><p>You can read more about Python Operators <a href=\"https:\/\/holypython.com\/beginner-python-lessons\/lesson-18-python-operators\/\">here<\/a>.<\/p><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-toggle-item\">\n\t\t\t\t\t<div id=\"elementor-tab-title-1662\" class=\"elementor-tab-title\" data-tab=\"2\" role=\"button\" aria-controls=\"elementor-tab-content-1662\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon elementor-toggle-icon-right\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-closed\"><i class=\"fas fa-plus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t<span class=\"elementor-toggle-icon-opened\"><i class=\"elementor-toggle-icon-opened fas fa-minus\"><\/i><\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-toggle-title\" tabindex=\"0\">Solution<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<div id=\"elementor-tab-content-1662\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"2\" role=\"region\" aria-labelledby=\"elementor-tab-title-1662\"><pre>print (glass_of_water)<\/pre><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3a682f7 elementor-section-full_width elementor-section-height-min-height elementor-section-content-middle elementor-section-height-default elementor-section-items-middle\" data-id=\"3a682f7\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-7655cd2\" data-id=\"7655cd2\" data-element_type=\"column\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7d7d028 elementor-widget elementor-widget-spacer\" data-id=\"7d7d028\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-78b3ba3 elementor-widget elementor-widget-button\" data-id=\"78b3ba3\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/app.holypython.com\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Holy Python AI+<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b8e8254 elementor-widget elementor-widget-spacer\" data-id=\"b8e8254\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-a32ba9d\" data-id=\"a32ba9d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-03480fb elementor-widget elementor-widget-heading\" data-id=\"03480fb\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-large\">Need More Exercises?<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6edfe36 elementor-widget__width-initial elementor-widget elementor-widget-testimonial\" data-id=\"6edfe36\" data-element_type=\"widget\" data-widget_type=\"testimonial.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-testimonial-wrapper\">\n\t\t\t\t\t\t\t<div class=\"elementor-testimonial-content\">Check out Holy Python AI+ for amazing Python learning tools.<br><br><b>*<\/b><i>Includes 14 more programming languages, inspirational tools and 1-on-1 consulting options.<\/i><\/div>\n\t\t\t\n\t\t\t\t\t\t<div class=\"elementor-testimonial-meta elementor-has-image elementor-testimonial-image-position-aside\">\n\t\t\t\t<div class=\"elementor-testimonial-meta-inner\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-testimonial-image\">\n\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1612\" height=\"1996\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2023\/04\/PXL_20220305_160849464.MP3-scaled-e1681462509264.jpg\" class=\"attachment-full size-full wp-image-31301\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2023\/04\/PXL_20220305_160849464.MP3-scaled-e1681462509264.jpg 1612w, https:\/\/holypython.com\/wp-content\/uploads\/2023\/04\/PXL_20220305_160849464.MP3-scaled-e1681462509264-242x300.jpg 242w, https:\/\/holypython.com\/wp-content\/uploads\/2023\/04\/PXL_20220305_160849464.MP3-scaled-e1681462509264-827x1024.jpg 827w, https:\/\/holypython.com\/wp-content\/uploads\/2023\/04\/PXL_20220305_160849464.MP3-scaled-e1681462509264-768x951.jpg 768w, https:\/\/holypython.com\/wp-content\/uploads\/2023\/04\/PXL_20220305_160849464.MP3-scaled-e1681462509264-1240x1536.jpg 1240w\" sizes=\"(max-width: 1612px) 100vw, 1612px\" \/>\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-testimonial-details\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-testimonial-name\">Umut Sagir<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-testimonial-job\">Finance & Data Science Professional, <br>Founder of HolyPython<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-01233e6 elementor-align-right elementor-widget elementor-widget-button\" data-id=\"01233e6\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/app.holypython.com\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Get Started<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Python Variable Exercises Let&#8217;s check out some exercises that will help you understand Variables in Python\u00a0better. Exercise 2-a Below is a good example of mixing numbers and text inside the print() function Assign: 3 to variable glass_of_water. #Type here. Assign a number to the variable: glass_of_water glass_of_water= print(&#8220;I drank&#8221;, glass_of_water, &#8220;glasses of water today.&#8221;) ==== [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1272,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-1473","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/pages\/1473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/comments?post=1473"}],"version-history":[{"count":6,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/pages\/1473\/revisions"}],"predecessor-version":[{"id":32371,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/pages\/1473\/revisions\/32371"}],"up":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/pages\/1272"}],"wp:attachment":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/media?parent=1473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}