From 38573d121007c9b6e6bdfcb38eb2409de27e4007 Mon Sep 17 00:00:00 2001 From: zehengl Date: Mon, 8 May 2023 05:13:33 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20coding-a?= =?UTF-8?q?rmadillo/learn-python@085619c65d09bded6f97858fa95238adaa3fad55?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 6 +- .../js/{app.973ee2f8.js => app.b79ba520.js} | 2 +- index.html | 4 +- lessons/advent-of-code.html | 6 +- lessons/another-challenge.html | 6 +- lessons/classes-objects.html | 6 +- lessons/coding-challenge.html | 6 +- lessons/comment.html | 6 +- lessons/control-flow.html | 6 +- lessons/functions.html | 6 +- lessons/index.html | 6 +- lessons/introduction.html | 6 +- lessons/make-executables.html | 6 +- lessons/mapping-data-type.html | 6 +- lessons/modules.html | 6 +- lessons/operator.html | 6 +- lessons/project-euler.html | 6 +- lessons/script.html | 6 +- lessons/sequence-data-type.html | 6 +- lessons/set-data-type.html | 6 +- lessons/setup.html | 6 +- lessons/tiny-challenge.html | 6 +- lessons/turtle.html | 6 +- lessons/variable-and-data-types.html | 6 +- lessons/version-control.html | 6 +- lessons/virtual-env.html | 6 +- service-worker.js | 56 +++++++++---------- tags.html | 6 +- 28 files changed, 106 insertions(+), 106 deletions(-) rename assets/js/{app.973ee2f8.js => app.b79ba520.js} (98%) diff --git a/404.html b/404.html index dc2c260..a8a242f 100644 --- a/404.html +++ b/404.html @@ -16,13 +16,13 @@ - + -

404

There's nothing here.
+ - + diff --git a/assets/js/app.973ee2f8.js b/assets/js/app.b79ba520.js similarity index 98% rename from assets/js/app.973ee2f8.js rename to assets/js/app.b79ba520.js index d59ccd3..4409c50 100644 --- a/assets/js/app.973ee2f8.js +++ b/assets/js/app.b79ba520.js @@ -18,4 +18,4 @@ var r=Object.freeze({}),o=Array.isArray;function i(t){return null==t}function a( * vue-router v3.6.5 * (c) 2022 Evan You * @license MIT - */function o(t,e){for(var n in e)t[n]=e[n];return t}var i=/[!'()*]/g,a=function(t){return"%"+t.charCodeAt(0).toString(16)},s=/%2C/g,l=function(t){return encodeURIComponent(t).replace(i,a).replace(s,",")};function c(t){try{return decodeURIComponent(t)}catch(t){0}return t}var u=function(t){return null==t||"object"==typeof t?t:String(t)};function f(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),r=c(n.shift()),o=n.length>0?c(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]})),e):e}function p(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return l(e);if(Array.isArray(n)){var r=[];return n.forEach((function(t){void 0!==t&&(null===t?r.push(l(e)):r.push(l(e)+"="+l(t)))})),r.join("&")}return l(e)+"="+l(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var d=/\/?$/;function h(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=v(i)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:y(e,o),matched:t?g(t):[]};return n&&(a.redirectedFrom=y(n,o)),Object.freeze(a)}function v(t){if(Array.isArray(t))return t.map(v);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=v(t[n]);return e}return t}var m=h(null,{path:"/"});function g(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function y(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;return void 0===o&&(o=""),(n||"/")+(e||p)(r)+o}function b(t,e,n){return e===m?t===e:!!e&&(t.path&&e.path?t.path.replace(d,"")===e.path.replace(d,"")&&(n||t.hash===e.hash&&_(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(n||t.hash===e.hash&&_(t.query,e.query)&&_(t.params,e.params))))}function _(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t).sort(),r=Object.keys(e).sort();return n.length===r.length&&n.every((function(n,o){var i=t[n];if(r[o]!==n)return!1;var a=e[n];return null==i||null==a?i===a:"object"==typeof i&&"object"==typeof a?_(i,a):String(i)===String(a)}))}function w(t){for(var e=0;e=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(i.path||""),p=e&&e.path||"/",d=c.path?O(c.path,p,n||i.append):p,h=function(t,e,n){void 0===e&&(e={});var r,o=n||f;try{r=o(t||"")}catch(t){r={}}for(var i in e){var a=e[i];r[i]=Array.isArray(a)?a.map(u):u(a)}return r}(c.query,i.query,r&&r.options.parseQuery),v=i.hash||c.hash;return v&&"#"!==v.charAt(0)&&(v="#"+v),{_normalized:!0,path:d,query:h,hash:v}}var H,W=function(){},K={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),a=i.location,s=i.route,l=i.href,c={},u=n.options.linkActiveClass,f=n.options.linkExactActiveClass,p=null==u?"router-link-active":u,v=null==f?"router-link-exact-active":f,m=null==this.activeClass?p:this.activeClass,g=null==this.exactActiveClass?v:this.exactActiveClass,y=s.redirectedFrom?h(null,q(s.redirectedFrom),null,n):s;c[g]=b(r,y,this.exactPath),c[m]=this.exact||this.exactPath?c[g]:function(t,e){return 0===t.path.replace(d,"/").indexOf(e.path.replace(d,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,y);var _=c[g]?this.ariaCurrentValue:null,w=function(t){X(t)&&(e.replace?n.replace(a,W):n.push(a,W))},x={click:X};Array.isArray(this.event)?this.event.forEach((function(t){x[t]=w})):x[this.event]=w;var C={class:c},O=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:l,route:s,navigate:w,isActive:c[m],isExactActive:c[g]});if(O){if(1===O.length)return O[0];if(O.length>1||!O.length)return 0===O.length?t():t("span",{},O)}if("a"===this.tag)C.on=x,C.attrs={href:l,"aria-current":_};else{var $=function t(e){var n;if(e)for(var r=0;r-1&&(s.params[p]=n.params[p]);return s.path=z(u.path,s.params),l(u,s,a)}if(s.path){s.params={};for(var d=0;d-1}function $t(t,e){return Ot(t)&&t._isRouter&&(null==e||t.type===e)}function kt(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function jt(t){return function(e,n,r){var o=!1,i=0,a=null;St(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var l,c=Et((function(e){var o;((o=e).__esModule||At&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:H.extend(e),n.components[s]=e,--i<=0&&r()})),u=Et((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Ot(t)?t:new Error(e),r(a))}));try{l=t(c,u)}catch(t){u(t)}if(l)if("function"==typeof l.then)l.then(c,u);else{var f=l.component;f&&"function"==typeof f.then&&f.then(c,u)}}})),o||r()}}function St(t,e){return Tt(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Tt(t){return Array.prototype.concat.apply([],t)}var At="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Et(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Pt=function(t,e){this.router=t,this.base=function(t){if(!t)if(Y){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Lt(t,e,n,r){var o=St(t,(function(t,r,o,i){var a=function(t,e){"function"!=typeof t&&(t=H.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,o,i)})):n(a,r,o,i)}));return Tt(r?o.reverse():o)}function Mt(t,e){if(e)return function(){return t.apply(e,arguments)}}Pt.prototype.listen=function(t){this.cb=t},Pt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Pt.prototype.onError=function(t){this.errorCbs.push(t)},Pt.prototype.transitionTo=function(t,e,n){var r,o=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),e&&e(r),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!o.ready&&($t(t,bt.redirected)&&i===m||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},Pt.prototype.confirmTransition=function(t,e,n){var r=this,o=this.current;this.pending=t;var i,a,s=function(t){!$t(t)&&Ot(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},l=t.matched.length-1,c=o.matched.length-1;if(b(t,o)&&l===c&&t.matched[l]===o.matched[c])return this.ensureURL(),t.hash&&st(this.router,o,t,!1),s(((a=xt(i=o,t,bt.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var u=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=mt&&n;r&&this.listeners.push(at());var o=function(){var n=t.current,o=Ut(t.base);t.current===m&&o===t._startLocation||t.transitionTo(o,(function(t){r&&st(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){gt($(r.base+t.fullPath)),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){yt($(r.base+t.fullPath)),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Ut(this.base)!==this.current.fullPath){var e=$(this.base+this.current.fullPath);t?gt(e):yt(e)}},e.prototype.getCurrentLocation=function(){return Ut(this.base)},e}(Pt);function Ut(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf($(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var It=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Ut(t);if(!/^\/#/.test(e))return window.location.replace($(t+"/#"+e)),!0}(this.base)||Dt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=mt&&e;n&&this.listeners.push(at());var r=function(){var e=t.current;Dt()&&t.transitionTo(Bt(),(function(r){n&&st(t.router,r,e,!0),mt||Vt(r.fullPath)}))},o=mt?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Ft(t.fullPath),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Vt(t.fullPath),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Bt()!==e&&(t?Ft(e):Vt(e))},e.prototype.getCurrentLocation=function(){return Bt()},e}(Pt);function Dt(){var t=Bt();return"/"===t.charAt(0)||(Vt("/"+t),!1)}function Bt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Nt(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Ft(t){mt?gt(Nt(t)):window.location.hash=t}function Vt(t){mt?yt(Nt(t)):window.location.replace(Nt(t))}var zt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){$t(t,bt.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Pt),qt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Q(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!mt&&!1!==t.fallback,this.fallback&&(e="hash"),Y||(e="abstract"),this.mode=e,e){case"history":this.history=new Rt(this,t.base);break;case"hash":this.history=new It(this,t.base,this.fallback);break;case"abstract":this.history=new zt(this,t.base);break;default:0}},Ht={currentRoute:{configurable:!0}};qt.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Ht.currentRoute.get=function(){return this.history&&this.history.current},qt.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof Rt||n instanceof It){var r=function(t){n.setupListeners(),function(t){var r=n.current,o=e.options.scrollBehavior;mt&&o&&"fullPath"in t&&st(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},qt.prototype.beforeEach=function(t){return Kt(this.beforeHooks,t)},qt.prototype.beforeResolve=function(t){return Kt(this.resolveHooks,t)},qt.prototype.afterEach=function(t){return Kt(this.afterHooks,t)},qt.prototype.onReady=function(t,e){this.history.onReady(t,e)},qt.prototype.onError=function(t){this.history.onError(t)},qt.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},qt.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},qt.prototype.go=function(t){this.history.go(t)},qt.prototype.back=function(){this.go(-1)},qt.prototype.forward=function(){this.go(1)},qt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},qt.prototype.resolve=function(t,e,n){var r=q(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?$(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},qt.prototype.getRoutes=function(){return this.matcher.getRoutes()},qt.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},qt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(qt.prototype,Ht);var Wt=qt;function Kt(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}qt.install=function t(e){if(!t.installed||H!==e){t.installed=!0,H=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",x),e.component("RouterLink",K);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},qt.version="3.6.5",qt.isNavigationFailure=$t,qt.NavigationFailureType=bt,qt.START_LOCATION=m,Y&&window.Vue&&window.Vue.use(qt);var Xt=n(1),Yt=n(50),Gt=n.n(Yt),Jt=n(51),Qt=n.n(Jt),Zt={created(){if(this.siteMeta=this.$site.headTags.filter(([t])=>"meta"===t).map(([t,e])=>e),this.$ssrContext){const e=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(t=e)?t.map(t=>{let e="{e+=` ${n}="${Qt()(t[n])}"`}),e+">"}).join("\n "):"",this.$ssrContext.canonicalLink=ee(this.$canonicalUrl)}var t},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const t=this.getMergedMetaTags();this.currentMetaTags=ne(t,this.currentMetaTags)},getMergedMetaTags(){const t=this.$page.frontmatter.meta||[];return Gt()([{name:"description",content:this.$description}],t,this.siteMeta,re)},updateCanonicalLink(){te(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",ee(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){ne(null,this.currentMetaTags),te()}};function te(){const t=document.querySelector("link[rel='canonical']");t&&t.remove()}function ee(t=""){return t?``:""}function ne(t,e){if(e&&[...e].filter(t=>t.parentNode===document.head).forEach(t=>document.head.removeChild(t)),t)return t.map(t=>{const e=document.createElement("meta");return Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),document.head.appendChild(e),e})}function re(t){for(const e of["name","property","itemprop"])if(t.hasOwnProperty(e))return t[e]+e;return JSON.stringify(t)}var oe=n(15),ie=n.n(oe),ae={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:ie()((function(){this.setActiveHash()}),300),setActiveHash(){const t=[].slice.call(document.querySelectorAll(".sidebar-link")),e=[].slice.call(document.querySelectorAll(".header-anchor")).filter(e=>t.some(t=>t.hash===e.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let t=0;t=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},se=n(16),le=n.n(se),ce={mounted(){le.a.configure({showSpinner:!1}),this.$router.beforeEach((t,e,n)=>{t.path===e.path||r.a.component(t.name)||le.a.start(),n()}),this.$router.afterEach(()=>{le.a.done(),this.isSidebarOpen=!1})}},ue=n(52),fe=n.n(ue),pe={mounted(){fe.a.polyfill()}};n(149);class de{constructor(){const t=document.getElementById("message-container");t?this.containerElement=t:(this.containerElement=document.createElement("div"),this.containerElement.id="message-container",document.body.appendChild(this.containerElement))}pop(t,e=2e3){const n=document.createElement("div");n.className="message move-in",n.innerHTML=t,this.containerElement.appendChild(n),e>0&&setTimeout(()=>{this.close(n)},e)}close(t){t.className=t.className.replace("move-in",""),t.className+="move-out",t.addEventListener("animationend",()=>{t.remove()})}}n(150),n(151);let he;const ve={selector:'div[class*="language-"] pre'},me={"/":{copy:"Copied successfully",hint:"Copy code"}},ge=()=>!!navigator&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/iu.test(navigator.userAgent);var ye=[Zt,ae,ce,pe,r.a.extend({mounted(){he=new de,ge()&&!ve.showInMobile||this.genCopyButton()},updated(){ge()&&!ve.showInMobile||this.genCopyButton()},methods:{genCopyButton(){const t=ve.selector||'.theme-default-content div[class*="language-"] pre';setTimeout(()=>{"string"==typeof t?document.querySelectorAll(t).forEach(this.insertCopyButton.bind(this)):Array.isArray(t)&&t.forEach(t=>{document.querySelectorAll(t).forEach(this.insertCopyButton.bind(this))})},ve.delay||500)},insertCopyButton(t){if(!t.hasAttribute("copy-code-registerd")){const e=document.createElement("button");ve.pure?(e.className="copy-code-pure-button",e.innerHTML=''):(e.className="copy-code-button",e.innerHTML=''),e.addEventListener("click",()=>{this.copyToClipboard(t.innerText)}),e.setAttribute("aria-label",me[this.$localePath||"/"].hint),e.setAttribute("data-balloon-pos","left"),t.parentElement&&t.parentElement.insertBefore(e,t),t.setAttribute("copy-code-registerd","")}},copyToClipboard(t){const e=document.getSelection(),n=!!(e&&e.rangeCount>0)&&e.getRangeAt(0),r=document.createElement("textarea");r.value=t,r.setAttribute("readonly",""),r.style.position="absolute",r.style.top="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),ve.pure||he.pop(`${me[this.$localePath||"/"].copy} 🎉`,ve.duration),document.body.removeChild(r),n&&e&&(e.removeAllRanges(),e.addRange(n))}}})],be={name:"GlobalLayout",computed:{layout(){const t=this.getLayout();return Object(Xt.h)("layout",t),r.a.component(t)}},methods:{getLayout(){if(this.$page.path){const t=this.$page.frontmatter.layout;return t&&(this.$vuepress.getLayoutAsyncComponent(t)||this.$vuepress.getVueComponent(t))?t:"Layout"}return"NotFound"}}},_e=n(5),we=Object(_e.a)(be,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;Object(Xt.f)(we,"mixins",ye);const xe=[{name:"v-66b4cf79",path:"/",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-66b4cf79").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-6b78e321",path:"/lessons/",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-6b78e321").then(n)}},{path:"/lessons/index.html",redirect:"/lessons/"},{name:"v-19898bac",path:"/lessons/advent-of-code.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-19898bac").then(n)}},{name:"v-0b0867a2",path:"/lessons/another-challenge.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-0b0867a2").then(n)}},{name:"v-beac693c",path:"/lessons/classes-objects.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-beac693c").then(n)}},{name:"v-36fe3f06",path:"/lessons/coding-challenge.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-36fe3f06").then(n)}},{name:"v-cc57a4bc",path:"/lessons/comment.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-cc57a4bc").then(n)}},{name:"v-7f5d36ca",path:"/lessons/control-flow.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-7f5d36ca").then(n)}},{name:"v-de1a313c",path:"/lessons/functions.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-de1a313c").then(n)}},{name:"v-75c8965c",path:"/lessons/introduction.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-75c8965c").then(n)}},{name:"v-6529ec1c",path:"/lessons/make-executables.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-6529ec1c").then(n)}},{name:"v-c365e4fc",path:"/lessons/mapping-data-type.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-c365e4fc").then(n)}},{name:"v-683aa2bc",path:"/lessons/modules.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-683aa2bc").then(n)}},{name:"v-9a762f84",path:"/lessons/operator.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-9a762f84").then(n)}},{name:"v-2a5482bc",path:"/lessons/project-euler.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-2a5482bc").then(n)}},{name:"v-71e9dd20",path:"/lessons/script.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-71e9dd20").then(n)}},{name:"v-225406b8",path:"/lessons/sequence-data-type.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-225406b8").then(n)}},{name:"v-41500ffc",path:"/lessons/set-data-type.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-41500ffc").then(n)}},{name:"v-908a22bc",path:"/lessons/setup.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-908a22bc").then(n)}},{name:"v-2fb13fda",path:"/lessons/tiny-challenge.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-2fb13fda").then(n)}},{name:"v-6a15700e",path:"/lessons/turtle.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-6a15700e").then(n)}},{name:"v-bbb2473c",path:"/lessons/variable-and-data-types.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-bbb2473c").then(n)}},{name:"v-7052777c",path:"/lessons/version-control.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-7052777c").then(n)}},{name:"v-f9ce7cbc",path:"/lessons/virtual-env.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-f9ce7cbc").then(n)}},{name:"v-1afaef88",path:"/tags.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-1afaef88").then(n)}},{path:"*",component:we}],Ce={title:"Learn Python",description:"",base:"/learn-python/",headTags:[["link",{rel:"icon",href:"/learn-python/logo.png"}],["link",{rel:"manifest",href:"/learn-python/manifest.json"}],["meta",{name:"theme-color",content:"#3eaf7c"}],["meta",{name:"apple-mobile-web-app-capable",content:"yes"}],["meta",{name:"apple-mobile-web-app-status-bar-style",content:"black"}],["link",{rel:"apple-touch-icon",href:"/learn-python/icons/apple-touch-icon-152x152.png"}],["link",{rel:"mask-icon",href:"/learn-python/icons/safari-pinned-tab.svg",color:"#3eaf7c"}],["meta",{name:"msapplication-TileImage",content:"/icons/msapplication-icon-144x144.png"}],["meta",{name:"msapplication-TileColor",content:"#000000"}]],pages:[{title:"Home",frontmatter:{home:!0,heroImage:"https://raw.githubusercontent.com/coding-armadillo/learn-python/main/lesson/.vuepress/public/logo.png",heroText:"Learn Python with Coding Armadillo",tagline:"Python Tutorial for Beginners",actionText:"Get Started →",actionLink:"/lessons/",features:[{title:"Topical & Incremental",details:"Start with fundamental basics the move onto more advanced topics"},{title:"Hands-on",details:"Learn by programming exercises and projects"},{title:"Open Source",details:"No extra cost other than a computer to use this course"}],footer:"MIT Licensed | Copyright © 2021-present Coding Armadillo"},regularPath:"/",relativePath:"README.md",key:"v-66b4cf79",path:"/",lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Table of Content",frontmatter:{sidebar:!1,editLink:!1},regularPath:"/lessons/",relativePath:"lessons/README.md",key:"v-6b78e321",path:"/lessons/",headers:[{level:2,title:"Lesson 01 Introduction",slug:"lesson-01-introduction"},{level:2,title:"Lesson 02 Setup Python Development Environment",slug:"lesson-02-setup-python-development-environment"},{level:2,title:"Lesson 03 Variable and Data Types",slug:"lesson-03-variable-and-data-types"},{level:2,title:"Lesson 04 Python Scripts",slug:"lesson-04-python-scripts"},{level:2,title:"Lesson 05 Operators",slug:"lesson-05-operators"},{level:2,title:"Lesson 06 Comments",slug:"lesson-06-comments"},{level:2,title:"Lesson 07 Control Flow",slug:"lesson-07-control-flow"},{level:2,title:"Lesson 08 Sequence Data Type",slug:"lesson-08-sequence-data-type"},{level:2,title:"Lesson 09 Mapping Data Type",slug:"lesson-09-mapping-data-type"},{level:2,title:"Lesson 10 Set Data Type",slug:"lesson-10-set-data-type"},{level:2,title:"Lesson 11 Functions",slug:"lesson-11-functions"},{level:2,title:"Lesson 12 Modules",slug:"lesson-12-modules"},{level:2,title:"Lesson 13 Version Control",slug:"lesson-13-version-control"},{level:2,title:"Lesson 14 A Tiny Challenge",slug:"lesson-14-a-tiny-challenge"},{level:2,title:"Lesson 15 The turtle library",slug:"lesson-15-the-turtle-library"},{level:2,title:"Lesson 16 Another Challenge",slug:"lesson-16-another-challenge"},{level:2,title:"Lesson 17 How to Make Executables",slug:"lesson-17-how-to-make-executables"},{level:2,title:"Lesson 18 Coding Challenge",slug:"lesson-18-coding-challenge"},{level:2,title:"Lesson 19 Classes and Objects",slug:"lesson-19-classes-and-objects"},{level:2,title:"Lesson 20 Virtual Environment",slug:"lesson-20-virtual-environment"},{level:2,title:"Lesson 21 Advent of Code",slug:"lesson-21-advent-of-code"},{level:2,title:"Lesson 22 Project Euler",slug:"lesson-22-project-euler"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Advent of Code",frontmatter:{title:"Advent of Code",tags:["Advent of Code"],prev:"./make-executables.md",next:"./project-euler.md"},regularPath:"/lessons/advent-of-code.html",relativePath:"lessons/advent-of-code.md",key:"v-19898bac",path:"/lessons/advent-of-code.html",lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Another Challenge",frontmatter:{title:"Another Challenge",tags:["Basic","CSV"],prev:"./turtle.md",next:"./make-executables.md"},regularPath:"/lessons/another-challenge.html",relativePath:"lessons/another-challenge.md",key:"v-0b0867a2",path:"/lessons/another-challenge.html",headers:[{level:2,title:"Assignment 20",slug:"assignment-20"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Classes and Objects",frontmatter:{title:"Classes and Objects",tags:["Object-oriented Programming","Class"],prev:"./coding-challenge.md",next:"./virtual-env.md"},regularPath:"/lessons/classes-objects.html",relativePath:"lessons/classes-objects.md",key:"v-beac693c",path:"/lessons/classes-objects.html",headers:[{level:2,title:"What's Object-oriented programming",slug:"what-s-object-oriented-programming"},{level:2,title:"Python class",slug:"python-class"},{level:3,title:"The constructor function",slug:"the-constructor-function"},{level:3,title:"Create an object",slug:"create-an-object"},{level:3,title:"The constructor function cont'd",slug:"the-constructor-function-cont-d"},{level:3,title:"The __str__ function",slug:"the-str-function"},{level:3,title:"The object methods",slug:"the-object-methods"},{level:2,title:"Assignment 24",slug:"assignment-24"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Coding Challenge",frontmatter:{title:"Coding Challenge",tags:["Coding Challenge"],prev:"./make-executables.md",next:"./classes-objects.md"},regularPath:"/lessons/coding-challenge.html",relativePath:"lessons/coding-challenge.md",key:"v-36fe3f06",path:"/lessons/coding-challenge.html",headers:[{level:2,title:"Assignment 22",slug:"assignment-22"},{level:2,title:"Assignment 23",slug:"assignment-23"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Comments",frontmatter:{title:"Comments",tags:["Basic","Comment"],prev:"./operator.md",next:"./control-flow.md"},regularPath:"/lessons/comment.html",relativePath:"lessons/comment.md",key:"v-cc57a4bc",path:"/lessons/comment.html",lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Control Flows",frontmatter:{title:"Control Flows",tags:["Basic","Control Flow"],prev:"./comment.md",next:"./sequence-data-type.md"},regularPath:"/lessons/control-flow.html",relativePath:"lessons/control-flow.md",key:"v-7f5d36ca",path:"/lessons/control-flow.html",headers:[{level:2,title:"if statements",slug:"if-statements"},{level:3,title:"elif",slug:"elif"},{level:3,title:"else",slug:"else"},{level:2,title:"Assignment 3",slug:"assignment-3"},{level:2,title:"while statements",slug:"while-statements"},{level:3,title:"break",slug:"break"},{level:3,title:"continue",slug:"continue"},{level:2,title:"Assignment 4",slug:"assignment-4"},{level:2,title:"for statements",slug:"for-statements"},{level:3,title:"break and continue",slug:"break-and-continue"},{level:2,title:"Assignment 5",slug:"assignment-5"},{level:2,title:"Quote",slug:"quote"},{level:2,title:"Assignment 6",slug:"assignment-6"},{level:2,title:"Assignment 7",slug:"assignment-7"},{level:2,title:"Assignment 8",slug:"assignment-8"},{level:2,title:"Assignment 9",slug:"assignment-9"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Functions",frontmatter:{title:"Functions",tags:["Basic","Function"],prev:"./set-data-type.md",next:"./modules.md"},regularPath:"/lessons/functions.html",relativePath:"lessons/functions.md",key:"v-de1a313c",path:"/lessons/functions.html",headers:[{level:2,title:"Create a function",slug:"create-a-function"},{level:2,title:"Call a function",slug:"call-a-function"},{level:2,title:"Arguments",slug:"arguments"},{level:2,title:"lambda function",slug:"lambda-function"},{level:2,title:"Assignment 12",slug:"assignment-12"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Introduction",frontmatter:{title:"Introduction",tags:["Basic","Introduction"],prev:"/lessons/",next:"./setup.md"},regularPath:"/lessons/introduction.html",relativePath:"lessons/introduction.md",key:"v-75c8965c",path:"/lessons/introduction.html",headers:[{level:2,title:"About",slug:"about"},{level:2,title:"Philosophy",slug:"philosophy"},{level:2,title:"Hello world program",slug:"hello-world-program"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"How to Make Executables",frontmatter:{title:"How to Make Executables",tags:["Basic","Pyinstaller"],prev:"./another-challenge.md",next:"./coding-challenge.md"},regularPath:"/lessons/make-executables.html",relativePath:"lessons/make-executables.md",key:"v-6529ec1c",path:"/lessons/make-executables.html",headers:[{level:2,title:"Getting started",slug:"getting-started"},{level:2,title:"Assignment 21",slug:"assignment-21"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Mapping Data Type",frontmatter:{title:"Mapping Data Type",tags:["Basic","Data Type"],prev:"./sequence-data-type.md",next:"./set-data-type.md"},regularPath:"/lessons/mapping-data-type.html",relativePath:"lessons/mapping-data-type.md",key:"v-c365e4fc",path:"/lessons/mapping-data-type.html",headers:[{level:2,title:"Dict",slug:"dict"},{level:3,title:"access values in the dict",slug:"access-values-in-the-dict"},{level:3,title:"functions of dict",slug:"functions-of-dict"},{level:3,title:"operators for dict",slug:"operators-for-dict"},{level:3,title:"iterate the dict",slug:"iterate-the-dict"},{level:3,title:"create a dict from list",slug:"create-a-dict-from-list"},{level:3,title:"complex dictionary",slug:"complex-dictionary"},{level:2,title:"Assignment 11",slug:"assignment-11"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Modules",frontmatter:{title:"Modules",tags:["Basic","Module"],prev:"./functions.md",next:"./version-control.md"},regularPath:"/lessons/modules.html",relativePath:"lessons/modules.md",key:"v-683aa2bc",path:"/lessons/modules.html",headers:[{level:2,title:"Custom module",slug:"custom-module"},{level:2,title:"Package",slug:"package"},{level:2,title:"Built-in Packages",slug:"built-in-packages"},{level:2,title:"Python Package Index",slug:"python-package-index"},{level:2,title:"Assignment 13",slug:"assignment-13"},{level:2,title:"What do you want to create?",slug:"what-do-you-want-to-create"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Operators",frontmatter:{title:"Operators",tags:["Basic","Operator"],prev:"./script.md",next:"./comment.md"},regularPath:"/lessons/operator.html",relativePath:"lessons/operator.md",key:"v-9a762f84",path:"/lessons/operator.html",headers:[{level:2,title:"Assignment Operator",slug:"assignment-operator"},{level:2,title:"Arithmetic operators",slug:"arithmetic-operators"},{level:2,title:"Assignment 2",slug:"assignment-2"},{level:2,title:"Comparison operators",slug:"comparison-operators"},{level:2,title:"Logical Operators",slug:"logical-operators"},{level:2,title:"Bitwise operators",slug:"bitwise-operators"},{level:2,title:"Assignment 2.5",slug:"assignment-2-5"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Project Euler",frontmatter:{title:"Project Euler",tags:["Project Euler"],prev:"./advent-of-code.md",next:null},regularPath:"/lessons/project-euler.html",relativePath:"lessons/project-euler.md",key:"v-2a5482bc",path:"/lessons/project-euler.html",lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Python Scripts",frontmatter:{title:"Python Scripts",tags:["Basic","Script"],prev:"./variable-and-data-types.md",next:"./operator.md"},regularPath:"/lessons/script.html",relativePath:"lessons/script.md",key:"v-71e9dd20",path:"/lessons/script.html",headers:[{level:2,title:"Assignment 1 explained",slug:"assignment-1-explained"},{level:3,title:"Solution 1",slug:"solution-1"},{level:3,title:"Solution 2",slug:"solution-2"},{level:3,title:"Solution 3",slug:"solution-3"},{level:3,title:"Save to file",slug:"save-to-file"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Sequence Data Type",frontmatter:{title:"Sequence Data Type",tags:["Basic","Data Type"],prev:"./control-flow.md",next:"./mapping-data-type.md"},regularPath:"/lessons/sequence-data-type.html",relativePath:"lessons/sequence-data-type.md",key:"v-225406b8",path:"/lessons/sequence-data-type.html",headers:[{level:2,title:"List",slug:"list"},{level:3,title:"access values in the list",slug:"access-values-in-the-list"},{level:3,title:"built-in functions for list",slug:"built-in-functions-for-list"},{level:3,title:"operators for list",slug:"operators-for-list"},{level:3,title:"functions of list",slug:"functions-of-list"},{level:3,title:"list comprehension",slug:"list-comprehension"},{level:2,title:"Tuple",slug:"tuple"},{level:3,title:"functions of tuple",slug:"functions-of-tuple"},{level:2,title:"Assignment 10",slug:"assignment-10"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Set Data Type",frontmatter:{title:"Set Data Type",tags:["Basic","Data Type"],prev:"./mapping-data-type.md",next:"./functions.md"},regularPath:"/lessons/set-data-type.html",relativePath:"lessons/set-data-type.md",key:"v-41500ffc",path:"/lessons/set-data-type.html",headers:[{level:2,title:"Set",slug:"set"},{level:3,title:"set comprehension",slug:"set-comprehension"},{level:3,title:"operators for set",slug:"operators-for-set"},{level:3,title:"functions for set",slug:"functions-for-set"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Setup Python Development Environment",frontmatter:{title:"Setup Python Development Environment",tags:["Basic","Setup"],prev:"./introduction.md",next:"./variable-and-data-types.md"},regularPath:"/lessons/setup.html",relativePath:"lessons/setup.md",key:"v-908a22bc",path:"/lessons/setup.html",headers:[{level:2,title:"Python",slug:"python"},{level:2,title:"Git",slug:"git"},{level:2,title:"Visual Studio Code",slug:"visual-studio-code"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"A Tiny Challenge",frontmatter:{title:"A Tiny Challenge",tags:["Basic"],prev:"./version-control.md",next:"./turtle.md"},regularPath:"/lessons/tiny-challenge.html",relativePath:"lessons/tiny-challenge.md",key:"v-2fb13fda",path:"/lessons/tiny-challenge.html",headers:[{level:2,title:"Assignment 14",slug:"assignment-14"},{level:3,title:"A generic counter",slug:"a-generic-counter"},{level:3,title:"Formatting with f-string",slug:"formatting-with-f-string"},{level:3,title:"Working with files",slug:"working-with-files"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"The turtle library",frontmatter:{title:"The turtle library",tags:["Basic","turtle"],prev:"./tiny-challenge.md",next:"./another-challenge.md"},regularPath:"/lessons/turtle.html",relativePath:"lessons/turtle.md",key:"v-6a15700e",path:"/lessons/turtle.html",headers:[{level:2,title:"Getting started",slug:"getting-started"},{level:2,title:"Screen",slug:"screen"},{level:2,title:"Turtle",slug:"turtle"},{level:3,title:"Moving",slug:"moving"},{level:3,title:"Filling",slug:"filling"},{level:3,title:"Multiple Turtles",slug:"multiple-turtles"},{level:3,title:"Moving without drawing",slug:"moving-without-drawing"},{level:2,title:"Assignment 15",slug:"assignment-15"},{level:2,title:"Assignment 16",slug:"assignment-16"},{level:2,title:"Assignment 17",slug:"assignment-17"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Variable and Data Types",frontmatter:{title:"Variable and Data Types",tags:["Basic","Variable","Data Type"],prev:"./setup.md",next:"./script.md"},regularPath:"/lessons/variable-and-data-types.html",relativePath:"lessons/variable-and-data-types.md",key:"v-bbb2473c",path:"/lessons/variable-and-data-types.html",headers:[{level:2,title:"Variable",slug:"variable"},{level:2,title:"Number",slug:"number"},{level:2,title:"Text",slug:"text"},{level:2,title:"Boolean",slug:"boolean"},{level:2,title:"Some Basic Built-in Functions",slug:"some-basic-built-in-functions"},{level:2,title:"Assignment 1",slug:"assignment-1"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Version Control",frontmatter:{title:"Version Control",tags:["Basic","Version Control"],prev:"./modules.md",next:"./tiny-challenge.md"},regularPath:"/lessons/version-control.html",relativePath:"lessons/version-control.md",key:"v-7052777c",path:"/lessons/version-control.html",headers:[{level:2,title:"Two types of version control systems",slug:"two-types-of-version-control-systems"},{level:3,title:"Centralized Version Control System",slug:"centralized-version-control-system"},{level:3,title:"Distributed Version Control System",slug:"distributed-version-control-system"},{level:2,title:"A Typical Workflow",slug:"a-typical-workflow"},{level:2,title:"Version Control Best Practices",slug:"version-control-best-practices"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Virtual Environment",frontmatter:{title:"Virtual Environment",tags:["Basic","Virtual Environment"],prev:"./classes-objects.md",next:"./advent-of-code.md"},regularPath:"/lessons/virtual-env.html",relativePath:"lessons/virtual-env.md",key:"v-f9ce7cbc",path:"/lessons/virtual-env.html",headers:[{level:2,title:"Why we need virtual environments",slug:"why-we-need-virtual-environments"},{level:2,title:"The venv module",slug:"the-venv-module"},{level:3,title:"Create a virtual environment",slug:"create-a-virtual-environment"},{level:3,title:"Activate a virtual environment",slug:"activate-a-virtual-environment"},{level:3,title:"Use pip",slug:"use-pip"}],lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3},{title:"Tags",frontmatter:{sidebar:!1,editLink:!1},regularPath:"/tags.html",relativePath:"tags.md",key:"v-1afaef88",path:"/tags.html",lastUpdated:"5/8/2023, 5:11:22 AM",lastUpdatedTimestamp:1683522682e3}],themeConfig:{repo:"coding-armadillo/learn-python",editLinks:!0,editLinkText:"Help us improve this page!",docsDir:"lesson",docsBranch:"main",logo:"/logo.png",sidebar:"auto",searchPlaceholder:"Search...",smoothScroll:!0,lastUpdated:"Last Updated",nav:[{text:"Lessons",link:"/lessons/"},{text:"Tags",link:"/tags/"}]}};n(152);r.a.component("TagLinks",()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,255))),r.a.component("TagList",()=>n.e(10).then(n.bind(null,227))),r.a.component("Badge",()=>Promise.all([n.e(0),n.e(6)]).then(n.bind(null,256))),r.a.component("CodeBlock",()=>Promise.all([n.e(0),n.e(7)]).then(n.bind(null,228))),r.a.component("CodeGroup",()=>Promise.all([n.e(0),n.e(8)]).then(n.bind(null,229)));n(153),n(154);function Oe(t){const e=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:n.left-e.left,y:n.top-e.top}}n(155);var $e={name:"BackToTop",props:{threshold:{type:Number,default:300}},data:()=>({scrollTop:null}),computed:{show(){return this.scrollTop>this.threshold}},mounted(){this.scrollTop=this.getScrollTop(),window.addEventListener("scroll",ie()(()=>{this.scrollTop=this.getScrollTop()},100))},methods:{getScrollTop:()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,scrollToTop(){window.scrollTo({top:0,behavior:"smooth"}),this.scrollTop=0}}},ke=(n(156),Object(_e.a)($e,(function(){var t=this._self._c;return t("transition",{attrs:{name:"fade"}},[this.show?t("svg",{staticClass:"go-to-top",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 49.484 28.284"},on:{click:this.scrollToTop}},[t("g",{attrs:{transform:"translate(-229 -126.358)"}},[t("rect",{attrs:{fill:"currentColor",width:"35",height:"5",rx:"2",transform:"translate(229 151.107) rotate(-45)"}}),this._v(" "),t("rect",{attrs:{fill:"currentColor",width:"35",height:"5",rx:"2",transform:"translate(274.949 154.642) rotate(-135)"}})])]):this._e()])}),[],!1,null,"5fd4ef0c",null).exports);class je{constructor(t){Object.defineProperty(this,"registration",{value:t,configurable:!0,writable:!0})}update(){return this.registration.update()}skipWaiting(){const t=this.registration.waiting;return t?(console.log("[vuepress:sw] Doing worker.skipWaiting()."),new Promise((e,n)=>{const r=new MessageChannel;r.port1.onmessage=t=>{console.log("[vuepress:sw] Done worker.skipWaiting()."),t.data.error?n(t.data.error):e(t.data)},t.postMessage({type:"skip-waiting"},[r.port2])})):Promise.resolve()}}var Se=n(7);r.a.component("SWUpdatePopup",()=>Promise.all([n.e(0),n.e(5)]).then(n.bind(null,225)));var Te=[{},({Vue:t})=>{t.mixin({computed:{$dataBlock(){return this.$options.__data__block__}}})},{},{},({Vue:t,router:e})=>{e.options.scrollBehavior=(e,n,r)=>{if(r)return window.scrollTo({top:r.y,behavior:"smooth"});if(e.hash){if(t.$vuepress.$get("disableScrollBehavior"))return!1;const n=document.querySelector(e.hash);return!!n&&window.scrollTo({top:Oe(n).y,behavior:"smooth"})}return window.scrollTo({top:0,behavior:"smooth"})}},{},({Vue:t})=>{t.component("BackToTop",ke)},async({router:t,isServer:e})=>{if(!e){const{register:e}=await n.e(35).then(n.bind(null,223));t.onReady(()=>{e("/learn-python/service-worker.js",{registrationOptions:{},ready(){console.log("[vuepress:sw] Service worker is active."),Se.a.$emit("sw-ready")},cached(t){console.log("[vuepress:sw] Content has been cached for offline use."),Se.a.$emit("sw-cached",new je(t))},updated(t){console.log("[vuepress:sw] Content updated."),Se.a.$emit("sw-updated",new je(t))},offline(){console.log("[vuepress:sw] No internet connection found. App is running in offline mode."),Se.a.$emit("sw-offline")},error(t){console.error("[vuepress:sw] Error during service worker registration:",t),Se.a.$emit("sw-error",t),GA_ID&&ga("send","exception",{exDescription:t.message,exFatal:!1})}})})}}],Ae=["BackToTop","SWUpdatePopup"];class Ee extends class{constructor(){this.store=new r.a({data:{state:{}}})}$get(t){return this.store.state[t]}$set(t,e){r.a.set(this.store.state,t,e)}$emit(...t){this.store.$emit(...t)}$on(...t){this.store.$on(...t)}}{}Object.assign(Ee.prototype,{getPageAsyncComponent:Xt.d,getLayoutAsyncComponent:Xt.c,getAsyncComponent:Xt.b,getVueComponent:Xt.e});var Pe={install(t){const e=new Ee;t.$vuepress=e,t.prototype.$vuepress=e}};function Le(t,e){const n=e.toLowerCase();return t.options.routes.some(t=>t.path.toLowerCase()===n)}var Me={props:{pageKey:String,slotKey:{type:String,default:"default"}},render(t){const e=this.pageKey||this.$parent.$page.key;return Object(Xt.h)("pageKey",e),r.a.component(e)||r.a.component(e,Object(Xt.d)(e)),r.a.component(e)?t(e):t("")}},Re={functional:!0,props:{slotKey:String,required:!0},render:(t,{props:e,slots:n})=>t("div",{class:["content__"+e.slotKey]},n()[e.slotKey])},Ue={computed:{openInNewWindowTitle(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},Ie=(n(157),n(158),Object(_e.a)(Ue,(function(){var t=this._self._c;return t("span",[t("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[t("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),t("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),t("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports),De={functional:!0,render(t,{parent:e,children:n}){if(e._isMounted)return n;e.$once("hook:mounted",()=>{e.$forceUpdate()})}};r.a.config.productionTip=!1,r.a.use(Wt),r.a.use(Pe),r.a.mixin(function(t,e,n=r.a){!function(t){t.locales&&Object.keys(t.locales).forEach(e=>{t.locales[e].path=e});Object.freeze(t)}(e),n.$vuepress.$set("siteData",e);const o=new(t(n.$vuepress.$get("siteData"))),i=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(o)),a={};return Object.keys(i).reduce((t,e)=>(e.startsWith("$")&&(t[e]=i[e].get),t),a),{computed:a}}(t=>class{setPage(t){this.__page=t}get $site(){return t}get $themeConfig(){return this.$site.themeConfig}get $frontmatter(){return this.$page.frontmatter}get $localeConfig(){const{locales:t={}}=this.$site;let e,n;for(const r in t)"/"===r?n=t[r]:0===this.$page.path.indexOf(r)&&(e=t[r]);return e||n||{}}get $siteTitle(){return this.$localeConfig.title||this.$site.title||""}get $canonicalUrl(){const{canonicalUrl:t}=this.$page.frontmatter;return"string"==typeof t&&t}get $title(){const t=this.$page,{metaTitle:e}=this.$page.frontmatter;if("string"==typeof e)return e;const n=this.$siteTitle,r=t.frontmatter.home?null:t.frontmatter.title||t.title;return n?r?r+" | "+n:n:r||"VuePress"}get $description(){const t=function(t){if(t){const e=t.filter(t=>"description"===t.name)[0];if(e)return e.content}}(this.$page.frontmatter.meta);return t||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}get $lang(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}get $localePath(){return this.$localeConfig.path||"/"}get $themeLocaleConfig(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}get $page(){return this.__page?this.__page:function(t,e){for(let n=0;nn||(t.hash?!r.a.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(t.hash)}:{x:0,y:0})});!function(t){t.beforeEach((e,n,r)=>{if(Le(t,e.path))r();else if(/(\/|\.html)$/.test(e.path))if(/\/$/.test(e.path)){const n=e.path.replace(/\/$/,"")+".html";Le(t,n)?r(n):r()}else r();else{const n=e.path+"/",o=e.path+".html";Le(t,o)?r(o):Le(t,n)?r(n):r()}})}(n);const o={};try{await Promise.all(Te.filter(t=>"function"==typeof t).map(e=>e({Vue:r.a,options:o,router:n,siteData:Ce,isServer:t})))}catch(t){console.error(t)}return{app:new r.a(Object.assign(o,{router:n,render:t=>t("div",{attrs:{id:"app"}},[t("RouterView",{ref:"layout"}),t("div",{class:"global-ui"},Ae.map(e=>t(e)))])})),router:n}}(!1).then(({app:t,router:e})=>{e.onReady(()=>{t.$mount("#app")})})}]); \ No newline at end of file + */function o(t,e){for(var n in e)t[n]=e[n];return t}var i=/[!'()*]/g,a=function(t){return"%"+t.charCodeAt(0).toString(16)},s=/%2C/g,l=function(t){return encodeURIComponent(t).replace(i,a).replace(s,",")};function c(t){try{return decodeURIComponent(t)}catch(t){0}return t}var u=function(t){return null==t||"object"==typeof t?t:String(t)};function f(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),r=c(n.shift()),o=n.length>0?c(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]})),e):e}function p(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return l(e);if(Array.isArray(n)){var r=[];return n.forEach((function(t){void 0!==t&&(null===t?r.push(l(e)):r.push(l(e)+"="+l(t)))})),r.join("&")}return l(e)+"="+l(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var d=/\/?$/;function h(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=v(i)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:y(e,o),matched:t?g(t):[]};return n&&(a.redirectedFrom=y(n,o)),Object.freeze(a)}function v(t){if(Array.isArray(t))return t.map(v);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=v(t[n]);return e}return t}var m=h(null,{path:"/"});function g(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function y(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;return void 0===o&&(o=""),(n||"/")+(e||p)(r)+o}function b(t,e,n){return e===m?t===e:!!e&&(t.path&&e.path?t.path.replace(d,"")===e.path.replace(d,"")&&(n||t.hash===e.hash&&_(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(n||t.hash===e.hash&&_(t.query,e.query)&&_(t.params,e.params))))}function _(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t).sort(),r=Object.keys(e).sort();return n.length===r.length&&n.every((function(n,o){var i=t[n];if(r[o]!==n)return!1;var a=e[n];return null==i||null==a?i===a:"object"==typeof i&&"object"==typeof a?_(i,a):String(i)===String(a)}))}function w(t){for(var e=0;e=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(i.path||""),p=e&&e.path||"/",d=c.path?O(c.path,p,n||i.append):p,h=function(t,e,n){void 0===e&&(e={});var r,o=n||f;try{r=o(t||"")}catch(t){r={}}for(var i in e){var a=e[i];r[i]=Array.isArray(a)?a.map(u):u(a)}return r}(c.query,i.query,r&&r.options.parseQuery),v=i.hash||c.hash;return v&&"#"!==v.charAt(0)&&(v="#"+v),{_normalized:!0,path:d,query:h,hash:v}}var H,W=function(){},K={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),a=i.location,s=i.route,l=i.href,c={},u=n.options.linkActiveClass,f=n.options.linkExactActiveClass,p=null==u?"router-link-active":u,v=null==f?"router-link-exact-active":f,m=null==this.activeClass?p:this.activeClass,g=null==this.exactActiveClass?v:this.exactActiveClass,y=s.redirectedFrom?h(null,q(s.redirectedFrom),null,n):s;c[g]=b(r,y,this.exactPath),c[m]=this.exact||this.exactPath?c[g]:function(t,e){return 0===t.path.replace(d,"/").indexOf(e.path.replace(d,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,y);var _=c[g]?this.ariaCurrentValue:null,w=function(t){X(t)&&(e.replace?n.replace(a,W):n.push(a,W))},x={click:X};Array.isArray(this.event)?this.event.forEach((function(t){x[t]=w})):x[this.event]=w;var C={class:c},O=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:l,route:s,navigate:w,isActive:c[m],isExactActive:c[g]});if(O){if(1===O.length)return O[0];if(O.length>1||!O.length)return 0===O.length?t():t("span",{},O)}if("a"===this.tag)C.on=x,C.attrs={href:l,"aria-current":_};else{var $=function t(e){var n;if(e)for(var r=0;r-1&&(s.params[p]=n.params[p]);return s.path=z(u.path,s.params),l(u,s,a)}if(s.path){s.params={};for(var d=0;d-1}function $t(t,e){return Ot(t)&&t._isRouter&&(null==e||t.type===e)}function kt(t,e,n){var r=function(o){o>=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function jt(t){return function(e,n,r){var o=!1,i=0,a=null;St(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){o=!0,i++;var l,c=Et((function(e){var o;((o=e).__esModule||At&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:H.extend(e),n.components[s]=e,--i<=0&&r()})),u=Et((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Ot(t)?t:new Error(e),r(a))}));try{l=t(c,u)}catch(t){u(t)}if(l)if("function"==typeof l.then)l.then(c,u);else{var f=l.component;f&&"function"==typeof f.then&&f.then(c,u)}}})),o||r()}}function St(t,e){return Tt(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Tt(t){return Array.prototype.concat.apply([],t)}var At="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Et(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Pt=function(t,e){this.router=t,this.base=function(t){if(!t)if(Y){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Lt(t,e,n,r){var o=St(t,(function(t,r,o,i){var a=function(t,e){"function"!=typeof t&&(t=H.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,o,i)})):n(a,r,o,i)}));return Tt(r?o.reverse():o)}function Mt(t,e){if(e)return function(){return t.apply(e,arguments)}}Pt.prototype.listen=function(t){this.cb=t},Pt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Pt.prototype.onError=function(t){this.errorCbs.push(t)},Pt.prototype.transitionTo=function(t,e,n){var r,o=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),e&&e(r),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!o.ready&&($t(t,bt.redirected)&&i===m||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},Pt.prototype.confirmTransition=function(t,e,n){var r=this,o=this.current;this.pending=t;var i,a,s=function(t){!$t(t)&&Ot(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},l=t.matched.length-1,c=o.matched.length-1;if(b(t,o)&&l===c&&t.matched[l]===o.matched[c])return this.ensureURL(),t.hash&&st(this.router,o,t,!1),s(((a=xt(i=o,t,bt.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var u=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=mt&&n;r&&this.listeners.push(at());var o=function(){var n=t.current,o=Ut(t.base);t.current===m&&o===t._startLocation||t.transitionTo(o,(function(t){r&&st(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){gt($(r.base+t.fullPath)),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){yt($(r.base+t.fullPath)),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Ut(this.base)!==this.current.fullPath){var e=$(this.base+this.current.fullPath);t?gt(e):yt(e)}},e.prototype.getCurrentLocation=function(){return Ut(this.base)},e}(Pt);function Ut(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf($(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var It=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Ut(t);if(!/^\/#/.test(e))return window.location.replace($(t+"/#"+e)),!0}(this.base)||Dt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=mt&&e;n&&this.listeners.push(at());var r=function(){var e=t.current;Dt()&&t.transitionTo(Bt(),(function(r){n&&st(t.router,r,e,!0),mt||Vt(r.fullPath)}))},o=mt?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},e.prototype.push=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Ft(t.fullPath),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this.current;this.transitionTo(t,(function(t){Vt(t.fullPath),st(r.router,t,o,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Bt()!==e&&(t?Ft(e):Vt(e))},e.prototype.getCurrentLocation=function(){return Bt()},e}(Pt);function Dt(){var t=Bt();return"/"===t.charAt(0)||(Vt("/"+t),!1)}function Bt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Nt(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Ft(t){mt?gt(Nt(t)):window.location.hash=t}function Vt(t){mt?yt(Nt(t)):window.location.replace(Nt(t))}var zt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){$t(t,bt.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Pt),qt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Q(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!mt&&!1!==t.fallback,this.fallback&&(e="hash"),Y||(e="abstract"),this.mode=e,e){case"history":this.history=new Rt(this,t.base);break;case"hash":this.history=new It(this,t.base,this.fallback);break;case"abstract":this.history=new zt(this,t.base);break;default:0}},Ht={currentRoute:{configurable:!0}};qt.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Ht.currentRoute.get=function(){return this.history&&this.history.current},qt.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof Rt||n instanceof It){var r=function(t){n.setupListeners(),function(t){var r=n.current,o=e.options.scrollBehavior;mt&&o&&"fullPath"in t&&st(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},qt.prototype.beforeEach=function(t){return Kt(this.beforeHooks,t)},qt.prototype.beforeResolve=function(t){return Kt(this.resolveHooks,t)},qt.prototype.afterEach=function(t){return Kt(this.afterHooks,t)},qt.prototype.onReady=function(t,e){this.history.onReady(t,e)},qt.prototype.onError=function(t){this.history.onError(t)},qt.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},qt.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},qt.prototype.go=function(t){this.history.go(t)},qt.prototype.back=function(){this.go(-1)},qt.prototype.forward=function(){this.go(1)},qt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},qt.prototype.resolve=function(t,e,n){var r=q(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?$(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},qt.prototype.getRoutes=function(){return this.matcher.getRoutes()},qt.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},qt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(qt.prototype,Ht);var Wt=qt;function Kt(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}qt.install=function t(e){if(!t.installed||H!==e){t.installed=!0,H=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",x),e.component("RouterLink",K);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},qt.version="3.6.5",qt.isNavigationFailure=$t,qt.NavigationFailureType=bt,qt.START_LOCATION=m,Y&&window.Vue&&window.Vue.use(qt);var Xt=n(1),Yt=n(50),Gt=n.n(Yt),Jt=n(51),Qt=n.n(Jt),Zt={created(){if(this.siteMeta=this.$site.headTags.filter(([t])=>"meta"===t).map(([t,e])=>e),this.$ssrContext){const e=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(t=e)?t.map(t=>{let e="{e+=` ${n}="${Qt()(t[n])}"`}),e+">"}).join("\n "):"",this.$ssrContext.canonicalLink=ee(this.$canonicalUrl)}var t},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const t=this.getMergedMetaTags();this.currentMetaTags=ne(t,this.currentMetaTags)},getMergedMetaTags(){const t=this.$page.frontmatter.meta||[];return Gt()([{name:"description",content:this.$description}],t,this.siteMeta,re)},updateCanonicalLink(){te(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",ee(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){ne(null,this.currentMetaTags),te()}};function te(){const t=document.querySelector("link[rel='canonical']");t&&t.remove()}function ee(t=""){return t?``:""}function ne(t,e){if(e&&[...e].filter(t=>t.parentNode===document.head).forEach(t=>document.head.removeChild(t)),t)return t.map(t=>{const e=document.createElement("meta");return Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),document.head.appendChild(e),e})}function re(t){for(const e of["name","property","itemprop"])if(t.hasOwnProperty(e))return t[e]+e;return JSON.stringify(t)}var oe=n(15),ie=n.n(oe),ae={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:ie()((function(){this.setActiveHash()}),300),setActiveHash(){const t=[].slice.call(document.querySelectorAll(".sidebar-link")),e=[].slice.call(document.querySelectorAll(".header-anchor")).filter(e=>t.some(t=>t.hash===e.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let t=0;t=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},se=n(16),le=n.n(se),ce={mounted(){le.a.configure({showSpinner:!1}),this.$router.beforeEach((t,e,n)=>{t.path===e.path||r.a.component(t.name)||le.a.start(),n()}),this.$router.afterEach(()=>{le.a.done(),this.isSidebarOpen=!1})}},ue=n(52),fe=n.n(ue),pe={mounted(){fe.a.polyfill()}};n(149);class de{constructor(){const t=document.getElementById("message-container");t?this.containerElement=t:(this.containerElement=document.createElement("div"),this.containerElement.id="message-container",document.body.appendChild(this.containerElement))}pop(t,e=2e3){const n=document.createElement("div");n.className="message move-in",n.innerHTML=t,this.containerElement.appendChild(n),e>0&&setTimeout(()=>{this.close(n)},e)}close(t){t.className=t.className.replace("move-in",""),t.className+="move-out",t.addEventListener("animationend",()=>{t.remove()})}}n(150),n(151);let he;const ve={selector:'div[class*="language-"] pre'},me={"/":{copy:"Copied successfully",hint:"Copy code"}},ge=()=>!!navigator&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/iu.test(navigator.userAgent);var ye=[Zt,ae,ce,pe,r.a.extend({mounted(){he=new de,ge()&&!ve.showInMobile||this.genCopyButton()},updated(){ge()&&!ve.showInMobile||this.genCopyButton()},methods:{genCopyButton(){const t=ve.selector||'.theme-default-content div[class*="language-"] pre';setTimeout(()=>{"string"==typeof t?document.querySelectorAll(t).forEach(this.insertCopyButton.bind(this)):Array.isArray(t)&&t.forEach(t=>{document.querySelectorAll(t).forEach(this.insertCopyButton.bind(this))})},ve.delay||500)},insertCopyButton(t){if(!t.hasAttribute("copy-code-registerd")){const e=document.createElement("button");ve.pure?(e.className="copy-code-pure-button",e.innerHTML=''):(e.className="copy-code-button",e.innerHTML=''),e.addEventListener("click",()=>{this.copyToClipboard(t.innerText)}),e.setAttribute("aria-label",me[this.$localePath||"/"].hint),e.setAttribute("data-balloon-pos","left"),t.parentElement&&t.parentElement.insertBefore(e,t),t.setAttribute("copy-code-registerd","")}},copyToClipboard(t){const e=document.getSelection(),n=!!(e&&e.rangeCount>0)&&e.getRangeAt(0),r=document.createElement("textarea");r.value=t,r.setAttribute("readonly",""),r.style.position="absolute",r.style.top="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),ve.pure||he.pop(`${me[this.$localePath||"/"].copy} 🎉`,ve.duration),document.body.removeChild(r),n&&e&&(e.removeAllRanges(),e.addRange(n))}}})],be={name:"GlobalLayout",computed:{layout(){const t=this.getLayout();return Object(Xt.h)("layout",t),r.a.component(t)}},methods:{getLayout(){if(this.$page.path){const t=this.$page.frontmatter.layout;return t&&(this.$vuepress.getLayoutAsyncComponent(t)||this.$vuepress.getVueComponent(t))?t:"Layout"}return"NotFound"}}},_e=n(5),we=Object(_e.a)(be,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;Object(Xt.f)(we,"mixins",ye);const xe=[{name:"v-66b4cf79",path:"/",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-66b4cf79").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-6b78e321",path:"/lessons/",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-6b78e321").then(n)}},{path:"/lessons/index.html",redirect:"/lessons/"},{name:"v-19898bac",path:"/lessons/advent-of-code.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-19898bac").then(n)}},{name:"v-0b0867a2",path:"/lessons/another-challenge.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-0b0867a2").then(n)}},{name:"v-beac693c",path:"/lessons/classes-objects.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-beac693c").then(n)}},{name:"v-36fe3f06",path:"/lessons/coding-challenge.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-36fe3f06").then(n)}},{name:"v-cc57a4bc",path:"/lessons/comment.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-cc57a4bc").then(n)}},{name:"v-7f5d36ca",path:"/lessons/control-flow.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-7f5d36ca").then(n)}},{name:"v-de1a313c",path:"/lessons/functions.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-de1a313c").then(n)}},{name:"v-75c8965c",path:"/lessons/introduction.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-75c8965c").then(n)}},{name:"v-6529ec1c",path:"/lessons/make-executables.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-6529ec1c").then(n)}},{name:"v-c365e4fc",path:"/lessons/mapping-data-type.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-c365e4fc").then(n)}},{name:"v-683aa2bc",path:"/lessons/modules.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-683aa2bc").then(n)}},{name:"v-9a762f84",path:"/lessons/operator.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-9a762f84").then(n)}},{name:"v-2a5482bc",path:"/lessons/project-euler.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-2a5482bc").then(n)}},{name:"v-71e9dd20",path:"/lessons/script.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-71e9dd20").then(n)}},{name:"v-225406b8",path:"/lessons/sequence-data-type.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-225406b8").then(n)}},{name:"v-41500ffc",path:"/lessons/set-data-type.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-41500ffc").then(n)}},{name:"v-908a22bc",path:"/lessons/setup.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-908a22bc").then(n)}},{name:"v-2fb13fda",path:"/lessons/tiny-challenge.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-2fb13fda").then(n)}},{name:"v-6a15700e",path:"/lessons/turtle.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-6a15700e").then(n)}},{name:"v-bbb2473c",path:"/lessons/variable-and-data-types.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-bbb2473c").then(n)}},{name:"v-7052777c",path:"/lessons/version-control.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-7052777c").then(n)}},{name:"v-f9ce7cbc",path:"/lessons/virtual-env.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-f9ce7cbc").then(n)}},{name:"v-1afaef88",path:"/tags.html",component:we,beforeEnter:(t,e,n)=>{Object(Xt.a)("Layout","v-1afaef88").then(n)}},{path:"*",component:we}],Ce={title:"Learn Python",description:"",base:"/learn-python/",headTags:[["link",{rel:"icon",href:"/learn-python/logo.png"}],["link",{rel:"manifest",href:"/learn-python/manifest.json"}],["meta",{name:"theme-color",content:"#3eaf7c"}],["meta",{name:"apple-mobile-web-app-capable",content:"yes"}],["meta",{name:"apple-mobile-web-app-status-bar-style",content:"black"}],["link",{rel:"apple-touch-icon",href:"/learn-python/icons/apple-touch-icon-152x152.png"}],["link",{rel:"mask-icon",href:"/learn-python/icons/safari-pinned-tab.svg",color:"#3eaf7c"}],["meta",{name:"msapplication-TileImage",content:"/icons/msapplication-icon-144x144.png"}],["meta",{name:"msapplication-TileColor",content:"#000000"}]],pages:[{title:"Home",frontmatter:{home:!0,heroImage:"https://raw.githubusercontent.com/coding-armadillo/learn-python/main/lesson/.vuepress/public/logo.png",heroText:"Learn Python with Coding Armadillo",tagline:"Python Tutorial for Beginners",actionText:"Get Started →",actionLink:"/lessons/",features:[{title:"Topical & Incremental",details:"Start with fundamental basics the move onto more advanced topics"},{title:"Hands-on",details:"Learn by programming exercises and projects"},{title:"Open Source",details:"No extra cost other than a computer to use this course"}],footer:"MIT Licensed | Copyright © 2021-present Coding Armadillo"},regularPath:"/",relativePath:"README.md",key:"v-66b4cf79",path:"/",lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Table of Content",frontmatter:{sidebar:!1,editLink:!1},regularPath:"/lessons/",relativePath:"lessons/README.md",key:"v-6b78e321",path:"/lessons/",headers:[{level:2,title:"Lesson 01 Introduction",slug:"lesson-01-introduction"},{level:2,title:"Lesson 02 Setup Python Development Environment",slug:"lesson-02-setup-python-development-environment"},{level:2,title:"Lesson 03 Variable and Data Types",slug:"lesson-03-variable-and-data-types"},{level:2,title:"Lesson 04 Python Scripts",slug:"lesson-04-python-scripts"},{level:2,title:"Lesson 05 Operators",slug:"lesson-05-operators"},{level:2,title:"Lesson 06 Comments",slug:"lesson-06-comments"},{level:2,title:"Lesson 07 Control Flow",slug:"lesson-07-control-flow"},{level:2,title:"Lesson 08 Sequence Data Type",slug:"lesson-08-sequence-data-type"},{level:2,title:"Lesson 09 Mapping Data Type",slug:"lesson-09-mapping-data-type"},{level:2,title:"Lesson 10 Set Data Type",slug:"lesson-10-set-data-type"},{level:2,title:"Lesson 11 Functions",slug:"lesson-11-functions"},{level:2,title:"Lesson 12 Modules",slug:"lesson-12-modules"},{level:2,title:"Lesson 13 Version Control",slug:"lesson-13-version-control"},{level:2,title:"Lesson 14 A Tiny Challenge",slug:"lesson-14-a-tiny-challenge"},{level:2,title:"Lesson 15 The turtle library",slug:"lesson-15-the-turtle-library"},{level:2,title:"Lesson 16 Another Challenge",slug:"lesson-16-another-challenge"},{level:2,title:"Lesson 17 How to Make Executables",slug:"lesson-17-how-to-make-executables"},{level:2,title:"Lesson 18 Coding Challenge",slug:"lesson-18-coding-challenge"},{level:2,title:"Lesson 19 Classes and Objects",slug:"lesson-19-classes-and-objects"},{level:2,title:"Lesson 20 Virtual Environment",slug:"lesson-20-virtual-environment"},{level:2,title:"Lesson 21 Advent of Code",slug:"lesson-21-advent-of-code"},{level:2,title:"Lesson 22 Project Euler",slug:"lesson-22-project-euler"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Advent of Code",frontmatter:{title:"Advent of Code",tags:["Advent of Code"],prev:"./make-executables.md",next:"./project-euler.md"},regularPath:"/lessons/advent-of-code.html",relativePath:"lessons/advent-of-code.md",key:"v-19898bac",path:"/lessons/advent-of-code.html",lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Another Challenge",frontmatter:{title:"Another Challenge",tags:["Basic","CSV"],prev:"./turtle.md",next:"./make-executables.md"},regularPath:"/lessons/another-challenge.html",relativePath:"lessons/another-challenge.md",key:"v-0b0867a2",path:"/lessons/another-challenge.html",headers:[{level:2,title:"Assignment 20",slug:"assignment-20"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Classes and Objects",frontmatter:{title:"Classes and Objects",tags:["Object-oriented Programming","Class"],prev:"./coding-challenge.md",next:"./virtual-env.md"},regularPath:"/lessons/classes-objects.html",relativePath:"lessons/classes-objects.md",key:"v-beac693c",path:"/lessons/classes-objects.html",headers:[{level:2,title:"What's Object-oriented programming",slug:"what-s-object-oriented-programming"},{level:2,title:"Python class",slug:"python-class"},{level:3,title:"The constructor function",slug:"the-constructor-function"},{level:3,title:"Create an object",slug:"create-an-object"},{level:3,title:"The constructor function cont'd",slug:"the-constructor-function-cont-d"},{level:3,title:"The __str__ function",slug:"the-str-function"},{level:3,title:"The object methods",slug:"the-object-methods"},{level:2,title:"Assignment 24",slug:"assignment-24"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Coding Challenge",frontmatter:{title:"Coding Challenge",tags:["Coding Challenge"],prev:"./make-executables.md",next:"./classes-objects.md"},regularPath:"/lessons/coding-challenge.html",relativePath:"lessons/coding-challenge.md",key:"v-36fe3f06",path:"/lessons/coding-challenge.html",headers:[{level:2,title:"Assignment 22",slug:"assignment-22"},{level:2,title:"Assignment 23",slug:"assignment-23"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Comments",frontmatter:{title:"Comments",tags:["Basic","Comment"],prev:"./operator.md",next:"./control-flow.md"},regularPath:"/lessons/comment.html",relativePath:"lessons/comment.md",key:"v-cc57a4bc",path:"/lessons/comment.html",lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Control Flows",frontmatter:{title:"Control Flows",tags:["Basic","Control Flow"],prev:"./comment.md",next:"./sequence-data-type.md"},regularPath:"/lessons/control-flow.html",relativePath:"lessons/control-flow.md",key:"v-7f5d36ca",path:"/lessons/control-flow.html",headers:[{level:2,title:"if statements",slug:"if-statements"},{level:3,title:"elif",slug:"elif"},{level:3,title:"else",slug:"else"},{level:2,title:"Assignment 3",slug:"assignment-3"},{level:2,title:"while statements",slug:"while-statements"},{level:3,title:"break",slug:"break"},{level:3,title:"continue",slug:"continue"},{level:2,title:"Assignment 4",slug:"assignment-4"},{level:2,title:"for statements",slug:"for-statements"},{level:3,title:"break and continue",slug:"break-and-continue"},{level:2,title:"Assignment 5",slug:"assignment-5"},{level:2,title:"Quote",slug:"quote"},{level:2,title:"Assignment 6",slug:"assignment-6"},{level:2,title:"Assignment 7",slug:"assignment-7"},{level:2,title:"Assignment 8",slug:"assignment-8"},{level:2,title:"Assignment 9",slug:"assignment-9"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Functions",frontmatter:{title:"Functions",tags:["Basic","Function"],prev:"./set-data-type.md",next:"./modules.md"},regularPath:"/lessons/functions.html",relativePath:"lessons/functions.md",key:"v-de1a313c",path:"/lessons/functions.html",headers:[{level:2,title:"Create a function",slug:"create-a-function"},{level:2,title:"Call a function",slug:"call-a-function"},{level:2,title:"Arguments",slug:"arguments"},{level:2,title:"lambda function",slug:"lambda-function"},{level:2,title:"Assignment 12",slug:"assignment-12"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Introduction",frontmatter:{title:"Introduction",tags:["Basic","Introduction"],prev:"/lessons/",next:"./setup.md"},regularPath:"/lessons/introduction.html",relativePath:"lessons/introduction.md",key:"v-75c8965c",path:"/lessons/introduction.html",headers:[{level:2,title:"About",slug:"about"},{level:2,title:"Philosophy",slug:"philosophy"},{level:2,title:"Hello world program",slug:"hello-world-program"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"How to Make Executables",frontmatter:{title:"How to Make Executables",tags:["Basic","Pyinstaller"],prev:"./another-challenge.md",next:"./coding-challenge.md"},regularPath:"/lessons/make-executables.html",relativePath:"lessons/make-executables.md",key:"v-6529ec1c",path:"/lessons/make-executables.html",headers:[{level:2,title:"Getting started",slug:"getting-started"},{level:2,title:"Assignment 21",slug:"assignment-21"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Mapping Data Type",frontmatter:{title:"Mapping Data Type",tags:["Basic","Data Type"],prev:"./sequence-data-type.md",next:"./set-data-type.md"},regularPath:"/lessons/mapping-data-type.html",relativePath:"lessons/mapping-data-type.md",key:"v-c365e4fc",path:"/lessons/mapping-data-type.html",headers:[{level:2,title:"Dict",slug:"dict"},{level:3,title:"access values in the dict",slug:"access-values-in-the-dict"},{level:3,title:"functions of dict",slug:"functions-of-dict"},{level:3,title:"operators for dict",slug:"operators-for-dict"},{level:3,title:"iterate the dict",slug:"iterate-the-dict"},{level:3,title:"create a dict from list",slug:"create-a-dict-from-list"},{level:3,title:"complex dictionary",slug:"complex-dictionary"},{level:2,title:"Assignment 11",slug:"assignment-11"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Modules",frontmatter:{title:"Modules",tags:["Basic","Module"],prev:"./functions.md",next:"./version-control.md"},regularPath:"/lessons/modules.html",relativePath:"lessons/modules.md",key:"v-683aa2bc",path:"/lessons/modules.html",headers:[{level:2,title:"Custom module",slug:"custom-module"},{level:2,title:"Package",slug:"package"},{level:2,title:"Built-in Packages",slug:"built-in-packages"},{level:2,title:"Python Package Index",slug:"python-package-index"},{level:2,title:"Assignment 13",slug:"assignment-13"},{level:2,title:"What do you want to create?",slug:"what-do-you-want-to-create"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Operators",frontmatter:{title:"Operators",tags:["Basic","Operator"],prev:"./script.md",next:"./comment.md"},regularPath:"/lessons/operator.html",relativePath:"lessons/operator.md",key:"v-9a762f84",path:"/lessons/operator.html",headers:[{level:2,title:"Assignment Operator",slug:"assignment-operator"},{level:2,title:"Arithmetic operators",slug:"arithmetic-operators"},{level:2,title:"Assignment 2",slug:"assignment-2"},{level:2,title:"Comparison operators",slug:"comparison-operators"},{level:2,title:"Logical Operators",slug:"logical-operators"},{level:2,title:"Bitwise operators",slug:"bitwise-operators"},{level:2,title:"Assignment 2.5",slug:"assignment-2-5"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Project Euler",frontmatter:{title:"Project Euler",tags:["Project Euler"],prev:"./advent-of-code.md",next:null},regularPath:"/lessons/project-euler.html",relativePath:"lessons/project-euler.md",key:"v-2a5482bc",path:"/lessons/project-euler.html",lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Python Scripts",frontmatter:{title:"Python Scripts",tags:["Basic","Script"],prev:"./variable-and-data-types.md",next:"./operator.md"},regularPath:"/lessons/script.html",relativePath:"lessons/script.md",key:"v-71e9dd20",path:"/lessons/script.html",headers:[{level:2,title:"Assignment 1 explained",slug:"assignment-1-explained"},{level:3,title:"Solution 1",slug:"solution-1"},{level:3,title:"Solution 2",slug:"solution-2"},{level:3,title:"Solution 3",slug:"solution-3"},{level:3,title:"Save to file",slug:"save-to-file"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Sequence Data Type",frontmatter:{title:"Sequence Data Type",tags:["Basic","Data Type"],prev:"./control-flow.md",next:"./mapping-data-type.md"},regularPath:"/lessons/sequence-data-type.html",relativePath:"lessons/sequence-data-type.md",key:"v-225406b8",path:"/lessons/sequence-data-type.html",headers:[{level:2,title:"List",slug:"list"},{level:3,title:"access values in the list",slug:"access-values-in-the-list"},{level:3,title:"built-in functions for list",slug:"built-in-functions-for-list"},{level:3,title:"operators for list",slug:"operators-for-list"},{level:3,title:"functions of list",slug:"functions-of-list"},{level:3,title:"list comprehension",slug:"list-comprehension"},{level:2,title:"Tuple",slug:"tuple"},{level:3,title:"functions of tuple",slug:"functions-of-tuple"},{level:2,title:"Assignment 10",slug:"assignment-10"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Set Data Type",frontmatter:{title:"Set Data Type",tags:["Basic","Data Type"],prev:"./mapping-data-type.md",next:"./functions.md"},regularPath:"/lessons/set-data-type.html",relativePath:"lessons/set-data-type.md",key:"v-41500ffc",path:"/lessons/set-data-type.html",headers:[{level:2,title:"Set",slug:"set"},{level:3,title:"set comprehension",slug:"set-comprehension"},{level:3,title:"operators for set",slug:"operators-for-set"},{level:3,title:"functions for set",slug:"functions-for-set"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Setup Python Development Environment",frontmatter:{title:"Setup Python Development Environment",tags:["Basic","Setup"],prev:"./introduction.md",next:"./variable-and-data-types.md"},regularPath:"/lessons/setup.html",relativePath:"lessons/setup.md",key:"v-908a22bc",path:"/lessons/setup.html",headers:[{level:2,title:"Python",slug:"python"},{level:2,title:"Git",slug:"git"},{level:2,title:"Visual Studio Code",slug:"visual-studio-code"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"A Tiny Challenge",frontmatter:{title:"A Tiny Challenge",tags:["Basic"],prev:"./version-control.md",next:"./turtle.md"},regularPath:"/lessons/tiny-challenge.html",relativePath:"lessons/tiny-challenge.md",key:"v-2fb13fda",path:"/lessons/tiny-challenge.html",headers:[{level:2,title:"Assignment 14",slug:"assignment-14"},{level:3,title:"A generic counter",slug:"a-generic-counter"},{level:3,title:"Formatting with f-string",slug:"formatting-with-f-string"},{level:3,title:"Working with files",slug:"working-with-files"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"The turtle library",frontmatter:{title:"The turtle library",tags:["Basic","turtle"],prev:"./tiny-challenge.md",next:"./another-challenge.md"},regularPath:"/lessons/turtle.html",relativePath:"lessons/turtle.md",key:"v-6a15700e",path:"/lessons/turtle.html",headers:[{level:2,title:"Getting started",slug:"getting-started"},{level:2,title:"Screen",slug:"screen"},{level:2,title:"Turtle",slug:"turtle"},{level:3,title:"Moving",slug:"moving"},{level:3,title:"Filling",slug:"filling"},{level:3,title:"Multiple Turtles",slug:"multiple-turtles"},{level:3,title:"Moving without drawing",slug:"moving-without-drawing"},{level:2,title:"Assignment 15",slug:"assignment-15"},{level:2,title:"Assignment 16",slug:"assignment-16"},{level:2,title:"Assignment 17",slug:"assignment-17"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Variable and Data Types",frontmatter:{title:"Variable and Data Types",tags:["Basic","Variable","Data Type"],prev:"./setup.md",next:"./script.md"},regularPath:"/lessons/variable-and-data-types.html",relativePath:"lessons/variable-and-data-types.md",key:"v-bbb2473c",path:"/lessons/variable-and-data-types.html",headers:[{level:2,title:"Variable",slug:"variable"},{level:2,title:"Number",slug:"number"},{level:2,title:"Text",slug:"text"},{level:2,title:"Boolean",slug:"boolean"},{level:2,title:"Some Basic Built-in Functions",slug:"some-basic-built-in-functions"},{level:2,title:"Assignment 1",slug:"assignment-1"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Version Control",frontmatter:{title:"Version Control",tags:["Basic","Version Control"],prev:"./modules.md",next:"./tiny-challenge.md"},regularPath:"/lessons/version-control.html",relativePath:"lessons/version-control.md",key:"v-7052777c",path:"/lessons/version-control.html",headers:[{level:2,title:"Two types of version control systems",slug:"two-types-of-version-control-systems"},{level:3,title:"Centralized Version Control System",slug:"centralized-version-control-system"},{level:3,title:"Distributed Version Control System",slug:"distributed-version-control-system"},{level:2,title:"A Typical Workflow",slug:"a-typical-workflow"},{level:2,title:"Version Control Best Practices",slug:"version-control-best-practices"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Virtual Environment",frontmatter:{title:"Virtual Environment",tags:["Basic","Virtual Environment"],prev:"./classes-objects.md",next:"./advent-of-code.md"},regularPath:"/lessons/virtual-env.html",relativePath:"lessons/virtual-env.md",key:"v-f9ce7cbc",path:"/lessons/virtual-env.html",headers:[{level:2,title:"Why we need virtual environments",slug:"why-we-need-virtual-environments"},{level:2,title:"The venv module",slug:"the-venv-module"},{level:3,title:"Create a virtual environment",slug:"create-a-virtual-environment"},{level:3,title:"Activate a virtual environment",slug:"activate-a-virtual-environment"},{level:3,title:"Use pip",slug:"use-pip"}],lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3},{title:"Tags",frontmatter:{sidebar:!1,editLink:!1},regularPath:"/tags.html",relativePath:"tags.md",key:"v-1afaef88",path:"/tags.html",lastUpdated:"5/8/2023, 5:12:25 AM",lastUpdatedTimestamp:1683522745e3}],themeConfig:{repo:"coding-armadillo/learn-python",editLinks:!0,editLinkText:"Help us improve this page!",docsDir:"lesson",docsBranch:"main",logo:"/logo.png",sidebar:"auto",searchPlaceholder:"Search...",smoothScroll:!0,lastUpdated:"Last Updated",nav:[{text:"Lessons",link:"/lessons/"},{text:"Tags",link:"/tags/"}]}};n(152);r.a.component("TagLinks",()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,255))),r.a.component("TagList",()=>n.e(10).then(n.bind(null,227))),r.a.component("Badge",()=>Promise.all([n.e(0),n.e(6)]).then(n.bind(null,256))),r.a.component("CodeBlock",()=>Promise.all([n.e(0),n.e(7)]).then(n.bind(null,228))),r.a.component("CodeGroup",()=>Promise.all([n.e(0),n.e(8)]).then(n.bind(null,229)));n(153),n(154);function Oe(t){const e=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:n.left-e.left,y:n.top-e.top}}n(155);var $e={name:"BackToTop",props:{threshold:{type:Number,default:300}},data:()=>({scrollTop:null}),computed:{show(){return this.scrollTop>this.threshold}},mounted(){this.scrollTop=this.getScrollTop(),window.addEventListener("scroll",ie()(()=>{this.scrollTop=this.getScrollTop()},100))},methods:{getScrollTop:()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,scrollToTop(){window.scrollTo({top:0,behavior:"smooth"}),this.scrollTop=0}}},ke=(n(156),Object(_e.a)($e,(function(){var t=this._self._c;return t("transition",{attrs:{name:"fade"}},[this.show?t("svg",{staticClass:"go-to-top",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 49.484 28.284"},on:{click:this.scrollToTop}},[t("g",{attrs:{transform:"translate(-229 -126.358)"}},[t("rect",{attrs:{fill:"currentColor",width:"35",height:"5",rx:"2",transform:"translate(229 151.107) rotate(-45)"}}),this._v(" "),t("rect",{attrs:{fill:"currentColor",width:"35",height:"5",rx:"2",transform:"translate(274.949 154.642) rotate(-135)"}})])]):this._e()])}),[],!1,null,"5fd4ef0c",null).exports);class je{constructor(t){Object.defineProperty(this,"registration",{value:t,configurable:!0,writable:!0})}update(){return this.registration.update()}skipWaiting(){const t=this.registration.waiting;return t?(console.log("[vuepress:sw] Doing worker.skipWaiting()."),new Promise((e,n)=>{const r=new MessageChannel;r.port1.onmessage=t=>{console.log("[vuepress:sw] Done worker.skipWaiting()."),t.data.error?n(t.data.error):e(t.data)},t.postMessage({type:"skip-waiting"},[r.port2])})):Promise.resolve()}}var Se=n(7);r.a.component("SWUpdatePopup",()=>Promise.all([n.e(0),n.e(5)]).then(n.bind(null,225)));var Te=[{},({Vue:t})=>{t.mixin({computed:{$dataBlock(){return this.$options.__data__block__}}})},{},{},({Vue:t,router:e})=>{e.options.scrollBehavior=(e,n,r)=>{if(r)return window.scrollTo({top:r.y,behavior:"smooth"});if(e.hash){if(t.$vuepress.$get("disableScrollBehavior"))return!1;const n=document.querySelector(e.hash);return!!n&&window.scrollTo({top:Oe(n).y,behavior:"smooth"})}return window.scrollTo({top:0,behavior:"smooth"})}},{},({Vue:t})=>{t.component("BackToTop",ke)},async({router:t,isServer:e})=>{if(!e){const{register:e}=await n.e(35).then(n.bind(null,223));t.onReady(()=>{e("/learn-python/service-worker.js",{registrationOptions:{},ready(){console.log("[vuepress:sw] Service worker is active."),Se.a.$emit("sw-ready")},cached(t){console.log("[vuepress:sw] Content has been cached for offline use."),Se.a.$emit("sw-cached",new je(t))},updated(t){console.log("[vuepress:sw] Content updated."),Se.a.$emit("sw-updated",new je(t))},offline(){console.log("[vuepress:sw] No internet connection found. App is running in offline mode."),Se.a.$emit("sw-offline")},error(t){console.error("[vuepress:sw] Error during service worker registration:",t),Se.a.$emit("sw-error",t),GA_ID&&ga("send","exception",{exDescription:t.message,exFatal:!1})}})})}}],Ae=["BackToTop","SWUpdatePopup"];class Ee extends class{constructor(){this.store=new r.a({data:{state:{}}})}$get(t){return this.store.state[t]}$set(t,e){r.a.set(this.store.state,t,e)}$emit(...t){this.store.$emit(...t)}$on(...t){this.store.$on(...t)}}{}Object.assign(Ee.prototype,{getPageAsyncComponent:Xt.d,getLayoutAsyncComponent:Xt.c,getAsyncComponent:Xt.b,getVueComponent:Xt.e});var Pe={install(t){const e=new Ee;t.$vuepress=e,t.prototype.$vuepress=e}};function Le(t,e){const n=e.toLowerCase();return t.options.routes.some(t=>t.path.toLowerCase()===n)}var Me={props:{pageKey:String,slotKey:{type:String,default:"default"}},render(t){const e=this.pageKey||this.$parent.$page.key;return Object(Xt.h)("pageKey",e),r.a.component(e)||r.a.component(e,Object(Xt.d)(e)),r.a.component(e)?t(e):t("")}},Re={functional:!0,props:{slotKey:String,required:!0},render:(t,{props:e,slots:n})=>t("div",{class:["content__"+e.slotKey]},n()[e.slotKey])},Ue={computed:{openInNewWindowTitle(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},Ie=(n(157),n(158),Object(_e.a)(Ue,(function(){var t=this._self._c;return t("span",[t("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[t("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),t("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),t("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports),De={functional:!0,render(t,{parent:e,children:n}){if(e._isMounted)return n;e.$once("hook:mounted",()=>{e.$forceUpdate()})}};r.a.config.productionTip=!1,r.a.use(Wt),r.a.use(Pe),r.a.mixin(function(t,e,n=r.a){!function(t){t.locales&&Object.keys(t.locales).forEach(e=>{t.locales[e].path=e});Object.freeze(t)}(e),n.$vuepress.$set("siteData",e);const o=new(t(n.$vuepress.$get("siteData"))),i=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(o)),a={};return Object.keys(i).reduce((t,e)=>(e.startsWith("$")&&(t[e]=i[e].get),t),a),{computed:a}}(t=>class{setPage(t){this.__page=t}get $site(){return t}get $themeConfig(){return this.$site.themeConfig}get $frontmatter(){return this.$page.frontmatter}get $localeConfig(){const{locales:t={}}=this.$site;let e,n;for(const r in t)"/"===r?n=t[r]:0===this.$page.path.indexOf(r)&&(e=t[r]);return e||n||{}}get $siteTitle(){return this.$localeConfig.title||this.$site.title||""}get $canonicalUrl(){const{canonicalUrl:t}=this.$page.frontmatter;return"string"==typeof t&&t}get $title(){const t=this.$page,{metaTitle:e}=this.$page.frontmatter;if("string"==typeof e)return e;const n=this.$siteTitle,r=t.frontmatter.home?null:t.frontmatter.title||t.title;return n?r?r+" | "+n:n:r||"VuePress"}get $description(){const t=function(t){if(t){const e=t.filter(t=>"description"===t.name)[0];if(e)return e.content}}(this.$page.frontmatter.meta);return t||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}get $lang(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}get $localePath(){return this.$localeConfig.path||"/"}get $themeLocaleConfig(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}get $page(){return this.__page?this.__page:function(t,e){for(let n=0;nn||(t.hash?!r.a.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(t.hash)}:{x:0,y:0})});!function(t){t.beforeEach((e,n,r)=>{if(Le(t,e.path))r();else if(/(\/|\.html)$/.test(e.path))if(/\/$/.test(e.path)){const n=e.path.replace(/\/$/,"")+".html";Le(t,n)?r(n):r()}else r();else{const n=e.path+"/",o=e.path+".html";Le(t,o)?r(o):Le(t,n)?r(n):r()}})}(n);const o={};try{await Promise.all(Te.filter(t=>"function"==typeof t).map(e=>e({Vue:r.a,options:o,router:n,siteData:Ce,isServer:t})))}catch(t){console.error(t)}return{app:new r.a(Object.assign(o,{router:n,render:t=>t("div",{attrs:{id:"app"}},[t("RouterView",{ref:"layout"}),t("div",{class:"global-ui"},Ae.map(e=>t(e)))])})),router:n}}(!1).then(({app:t,router:e})=>{e.onReady(()=>{t.$mount("#app")})})}]); \ No newline at end of file diff --git a/index.html b/index.html index 3565467..b492c65 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ - + @@ -41,6 +41,6 @@

Topical & Incremental

Start with fundamental basics the move onto more advanced topics

Hands-on

Learn by programming exercises and projects

Open Source

No extra cost other than a computer to use this course

- + diff --git a/lessons/advent-of-code.html b/lessons/advent-of-code.html index 2617f1c..f7d1176 100644 --- a/lessons/advent-of-code.html +++ b/lessons/advent-of-code.html @@ -16,7 +16,7 @@ - + @@ -32,7 +32,7 @@ Tags
GitHub - (opens new window)

# Advent of Code

#Advent of Code

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.

You don't need a computer science background to participate - just a little programming knowledge and some problem solving skills will get you pretty far. Nor do you need a fancy computer; every problem has a solution that completes in at most 15 seconds on ten-year-old hardware.

You can participate in https://adventofcode.com (opens new window).

- + diff --git a/lessons/another-challenge.html b/lessons/another-challenge.html index 8a1b894..b189472 100644 --- a/lessons/another-challenge.html +++ b/lessons/another-challenge.html @@ -16,7 +16,7 @@ - + @@ -71,7 +71,7 @@ writer.writerows([[a, b, c, area(a, b, c)] for a, b, c in triangles]) print(f"{number} triangles generated") -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- + diff --git a/lessons/classes-objects.html b/lessons/classes-objects.html index e33bb7e..a56be33 100644 --- a/lessons/classes-objects.html +++ b/lessons/classes-objects.html @@ -16,7 +16,7 @@ - + @@ -225,7 +225,7 @@ calculator.undo() assert calculator.value == 10 -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
- + diff --git a/lessons/coding-challenge.html b/lessons/coding-challenge.html index 2615c98..b963b76 100644 --- a/lessons/coding-challenge.html +++ b/lessons/coding-challenge.html @@ -16,7 +16,7 @@ - + @@ -217,7 +217,7 @@ undo() assert value == 5 -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
- + diff --git a/lessons/comment.html b/lessons/comment.html index 9ca468d..cd73a47 100644 --- a/lessons/comment.html +++ b/lessons/comment.html @@ -16,7 +16,7 @@ - + @@ -46,7 +46,7 @@ years = 20 end_balance = init_amount * (1 + rate) ** years print(end_balance) -
1
2
3
4
5
- + diff --git a/lessons/control-flow.html b/lessons/control-flow.html index 64a8342..19f6e71 100644 --- a/lessons/control-flow.html +++ b/lessons/control-flow.html @@ -16,7 +16,7 @@ - + @@ -302,7 +302,7 @@ print("Odd number") else: print("Even Number") -
1
2
3
4
5
6
7
8
9
- + diff --git a/lessons/functions.html b/lessons/functions.html index 08fc0cd..2946f3e 100644 --- a/lessons/functions.html +++ b/lessons/functions.html @@ -16,7 +16,7 @@ - + @@ -227,7 +227,7 @@ func() print() -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
- + diff --git a/lessons/index.html b/lessons/index.html index 2e20b09..e0a9f93 100644 --- a/lessons/index.html +++ b/lessons/index.html @@ -16,7 +16,7 @@ - + @@ -32,7 +32,7 @@ Tags GitHub - (opens new window)

# Table of Content

# Lesson 01 Introduction

# Lesson 02 Setup Python Development Environment

# Lesson 03 Variable and Data Types

# Lesson 04 Python Scripts

# Lesson 05 Operators

# Lesson 06 Comments

# Lesson 07 Control Flow

# Lesson 08 Sequence Data Type

# Lesson 09 Mapping Data Type

# Lesson 10 Set Data Type

# Lesson 11 Functions

# Lesson 12 Modules

# Lesson 13 Version Control

# Lesson 14 A Tiny Challenge

# Lesson 15 The turtle library

# Lesson 16 Another Challenge

# Lesson 17 How to Make Executables

# Lesson 18 Coding Challenge

# Lesson 19 Classes and Objects

# Lesson 20 Virtual Environment

# Lesson 21 Advent of Code

# Lesson 22 Project Euler

to be continued...

Last Updated: 5/8/2023, 5:11:22 AM
- + (opens new window)

# Table of Content

# Lesson 01 Introduction

# Lesson 02 Setup Python Development Environment

# Lesson 03 Variable and Data Types

# Lesson 04 Python Scripts

# Lesson 05 Operators

# Lesson 06 Comments

# Lesson 07 Control Flow

# Lesson 08 Sequence Data Type

# Lesson 09 Mapping Data Type

# Lesson 10 Set Data Type

# Lesson 11 Functions

# Lesson 12 Modules

# Lesson 13 Version Control

# Lesson 14 A Tiny Challenge

# Lesson 15 The turtle library

# Lesson 16 Another Challenge

# Lesson 17 How to Make Executables

# Lesson 18 Coding Challenge

# Lesson 19 Classes and Objects

# Lesson 20 Virtual Environment

# Lesson 21 Advent of Code

# Lesson 22 Project Euler

to be continued...

Last Updated: 5/8/2023, 5:12:25 AM
+ diff --git a/lessons/introduction.html b/lessons/introduction.html index c38001e..e143e11 100644 --- a/lessons/introduction.html +++ b/lessons/introduction.html @@ -16,7 +16,7 @@ - + @@ -34,7 +34,7 @@ GitHub (opens new window)

# Introduction

#Basic#Introduction

# About

Python was created by Guido van Rossum (opens new window) and first released on 1991.

It was named after a TV show "Monty Python's Flying Circus" (opens new window).

Python is a battery-included language that comes with many builtin functions and standard libraries (opens new window) and has a strong ecosystem for numerous open source libraries (opens new window). It is widely used in many scenarios, such as scientific programming, machine learning, web development, application development, and etc.

# Philosophy

See PEP-20 (opens new window).

  • Beautiful is better than ugly.
  • Explicit is better than implicit.
  • Simple is better than complex.
  • Complex is better than complicated.
  • Flat is better than nested.
  • Sparse is better than dense.
  • Readability counts.
  • Special cases aren't special enough to break the rules.
  • Although practicality beats purity.
  • Errors should never pass silently.
  • Unless explicitly silenced.
  • In the face of ambiguity, refuse the temptation to guess.
  • There should be one-- and preferably only one --obvious way to do it.
  • Although that way may not be obvious at first unless you're Dutch.
  • Now is better than never.
  • Although never is often better than right now.
  • If the implementation is hard to explain, it's a bad idea.
  • If the implementation is easy to explain, it may be a good idea.
  • Namespaces are one honking great idea -- let's do more of those!

You can also display them from a Python Shell.

import this
 
1

# Hello world program

print("Hello, world!")
-
1

In the following section we will learn how to setup a Python environment alongside with some useful tools for development.

In the following section we will learn how to setup a Python environment alongside with some useful tools for development.

- + diff --git a/lessons/make-executables.html b/lessons/make-executables.html index 644ee43..434e7a8 100644 --- a/lessons/make-executables.html +++ b/lessons/make-executables.html @@ -16,7 +16,7 @@ - + @@ -35,7 +35,7 @@ (opens new window)

# How to Make Executables

#Basic#Pyinstaller

We can use Pyinstaller (opens new window) to package Python scripts into standalone executables. And it works across different platforms.

More

It's worth noting that Pyinstaller can compile to a single executable file, when --onefile option is chosen. Also on which OS it is run, it makes matching executable, i.e. .exe when run on Windows

# Getting started

First, we need to install Pyinstaller from PyPI

pip install pyinstaller
 
1

Then, go to the script folder and run

pyinstaller script.py
 
1

The bundle will be generated in a folder called dist.

As mentioned above, if we prefer single executable file, include the --onefile option.

pyinstaller script.py --onefile
-
1

# Assignment 21

Use Pyinstaller to make your solution to Assignment 20 an executable.

# Assignment 21

Use Pyinstaller to make your solution to Assignment 20 an executable.

- + diff --git a/lessons/mapping-data-type.html b/lessons/mapping-data-type.html index d5347f5..15d6440 100644 --- a/lessons/mapping-data-type.html +++ b/lessons/mapping-data-type.html @@ -16,7 +16,7 @@ - + @@ -160,7 +160,7 @@ print( f"This company has {size} employees and the average compensation is {total_salaries/size}." ) -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- + diff --git a/lessons/modules.html b/lessons/modules.html index 47ab12e..5966e74 100644 --- a/lessons/modules.html +++ b/lessons/modules.html @@ -16,7 +16,7 @@ - + @@ -198,7 +198,7 @@ func() print() -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# What do you want to create?

Brainstorm and find your passion. Let's discuss what to build 🔨 !

# What do you want to create?

Brainstorm and find your passion. Let's discuss what to build 🔨 !

- + diff --git a/lessons/operator.html b/lessons/operator.html index 4012dfc..f5ec4dc 100644 --- a/lessons/operator.html +++ b/lessons/operator.html @@ -16,7 +16,7 @@ - + @@ -82,7 +82,7 @@ print(~1)
1
2
3
4
5
6

WARNING

Applying ~ to a number in Python requires knowledge about Two's complement (opens new window). It also has to deal with sign (positive/negative). We may talk about this in future.

# Assignment 2.5

Kattis Problem Archive (opens new window) is a great source to practice programming and problem solving skills. Let's take a look at problem R2 (opens new window).

Given that you can use the following code to capture user input of r1 and s, how would you solve this problem?

r1, s = input().split()
-
1
- + diff --git a/lessons/project-euler.html b/lessons/project-euler.html index b7391e5..b2793f9 100644 --- a/lessons/project-euler.html +++ b/lessons/project-euler.html @@ -16,7 +16,7 @@ - + @@ -32,11 +32,11 @@ Tags GitHub - (opens new window)

# Project Euler

#Project Euler

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.

You can participate in https://projecteuler.net (opens new window).

- + diff --git a/lessons/script.html b/lessons/script.html index fbc0912..fc4eb46 100644 --- a/lessons/script.html +++ b/lessons/script.html @@ -16,7 +16,7 @@ - + @@ -43,7 +43,7 @@
1
2

# Save to file

A program file or script written in Python usually has the file extension .py. We can ask the Python interpreter to execute a .py file (Python script).

Now let's create a file named hello.py and put either solution from above in the file. Then open terminal and type the following command:

python hello.py
-
1

You should be able to type a name in command line and expect a greeting.

hello.py (opens new window)

You should be able to type a name in command line and expect a greeting.

hello.py (opens new window)

- + diff --git a/lessons/sequence-data-type.html b/lessons/sequence-data-type.html index ce1332d..0c8c2ef 100644 --- a/lessons/sequence-data-type.html +++ b/lessons/sequence-data-type.html @@ -16,7 +16,7 @@ - + @@ -122,7 +122,7 @@ scores.append(score) print("Average score is", sum(scores) / size) -
1
2
3
4
5
6
7
8
- + diff --git a/lessons/set-data-type.html b/lessons/set-data-type.html index 4f2fadd..f57c8c3 100644 --- a/lessons/set-data-type.html +++ b/lessons/set-data-type.html @@ -16,7 +16,7 @@ - + @@ -80,7 +80,7 @@ print(basket1)
1
2
3
4
5

We use clear() to remove all items from a set.

basket1.clear()
 print(basket1)
-
1
2
- + diff --git a/lessons/setup.html b/lessons/setup.html index dc63f18..8e0cc73 100644 --- a/lessons/setup.html +++ b/lessons/setup.html @@ -16,7 +16,7 @@ - + @@ -35,7 +35,7 @@ (opens new window)

# Setup Python Development Environment

#Basic#Setup

Oh heads-up

Assuming we are using Windows...

In case you use other operation systems

TBD

# Python

There are many ways to install Python. A straightforward way is to go to https://www.python.org/downloads/ (opens new window) and get the latest version (3.9.5).

Then run the executable (.exe file) to install Python on our machine.

Make sure to check the "Add Python to PATH" checkbox.

When installation succeeds, we shall be able to open a command line program (Command Prompt or PowerShell) and run a Python shell by typing python.

# Git

Git is a very popular version control system that we would use to manage our codes. To install Git, simply go to https://git-scm.com/downloads (opens new window) and get the latest version (2.31.1).

Then run the executable (.exe file) to install Git on our machine. Accept all the default options.

We will talk about how to use Git in future section, as well as how to GitHub (opens new window) to host our codes.

# Visual Studio Code

We would use this popular and powerful editor to write Python codes. -To install Visual Studio Code, simply go to https://code.visualstudio.com (opens new window) and get the latest version.

Then run the executable (.exe file) to complete installation.

- + diff --git a/lessons/tiny-challenge.html b/lessons/tiny-challenge.html index 0466c41..dc19332 100644 --- a/lessons/tiny-challenge.html +++ b/lessons/tiny-challenge.html @@ -16,7 +16,7 @@ - + @@ -159,7 +159,7 @@
1
2

Also note that the file object f can be iterated.

with open("result.txt") as f:
     for line in f:
         print(line)
-
1
2
3
- + diff --git a/lessons/turtle.html b/lessons/turtle.html index b276f74..c5d8be9 100644 --- a/lessons/turtle.html +++ b/lessons/turtle.html @@ -16,7 +16,7 @@ - + @@ -198,7 +198,7 @@ t.title(title) t.done() -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
- + diff --git a/lessons/variable-and-data-types.html b/lessons/variable-and-data-types.html index 0877b46..c8a9f44 100644 --- a/lessons/variable-and-data-types.html +++ b/lessons/variable-and-data-types.html @@ -16,7 +16,7 @@ - + @@ -83,7 +83,7 @@
1

WARNING

Remember that input() always gives value in string

# Assignment 1

Write some Python statements to ask our names then display "Hello, name".

The workflow the program is as follows:

  1. First, the command line would prompt "What is your name? "

  2. Suppose we enter "Jack".

  3. Then, the command line displays "Hello, Jack"

Sample Solution
name = input("What is your name? ")
 
 print("Hello,", name)
-
1
2
3
- + diff --git a/lessons/version-control.html b/lessons/version-control.html index cbead65..df78eb4 100644 --- a/lessons/version-control.html +++ b/lessons/version-control.html @@ -16,7 +16,7 @@ - + @@ -45,7 +45,7 @@
1

If we use GitHub (opens new window) for our remote repository, we set it up by adding a remote url.

git remote add <name> <url>
 
1

where <name> is an arbitrary label for the remote sever, and <url> is the address of that remote server.

And we can push to the remote for the first time

git push -u <name> <branch_name>
 
1

Later on, we can simply

git push
-
1

VS Code has a Source Control (opens new window) tab to work with Git using a simple GUI. We will demo it in class.

GitLens (opens new window) and Version Lens (opens new window) are two handy extensions we can install to work with Git.

# Version Control Best Practices

VS Code has a Source Control (opens new window) tab to work with Git using a simple GUI. We will demo it in class.

GitLens (opens new window) and Version Lens (opens new window) are two handy extensions we can install to work with Git.

# Version Control Best Practices

- + diff --git a/lessons/virtual-env.html b/lessons/virtual-env.html index d48af47..0795321 100644 --- a/lessons/virtual-env.html +++ b/lessons/virtual-env.html @@ -16,7 +16,7 @@ - + @@ -46,7 +46,7 @@
1

or

pip freeze
 
1

pip freeze would generate in the pip-readable format so that if we redirect the output to a file, we can use that file to clone a virtual environment.

pip freeze > requirements.txt
 
1

Then, use the requirements.txt on a new virtual environment

pip install -r requirements.txt
-
1
- + diff --git a/service-worker.js b/service-worker.js index 78f0778..e62d969 100644 --- a/service-worker.js +++ b/service-worker.js @@ -27,7 +27,7 @@ self.addEventListener('message', (event) => { self.__precacheManifest = [ { "url": "404.html", - "revision": "c6fd9c7a593470ac46fcd71eb681820a" + "revision": "0e0fdda3688e6551ea653be5c54b2134" }, { "url": "assets/css/0.styles.236a5a48.css", @@ -262,8 +262,8 @@ self.__precacheManifest = [ "revision": "790921dd7bfff067dcf72c1ccd9e1dad" }, { - "url": "assets/js/app.973ee2f8.js", - "revision": "94c1d7373ab4f98174d3bfe6dbcf86f7" + "url": "assets/js/app.b79ba520.js", + "revision": "45af9be56d3a0905f0b35ddcb0d32cce" }, { "url": "icons/apple-touch-icon-152x152.png", @@ -279,99 +279,99 @@ self.__precacheManifest = [ }, { "url": "index.html", - "revision": "a4e556a799b0395754eb3fe3e1b37c35" + "revision": "51264148a9b107f987f5756c66c64820" }, { "url": "lessons/advent-of-code.html", - "revision": "ca42d90edc27a3059dafeea26df886cf" + "revision": "c16bb84ea850c7e492c581175c78351e" }, { "url": "lessons/another-challenge.html", - "revision": "556557a6e91a45116952193b805872f9" + "revision": "0022e2bbda2dc2faef515481f40eb4f2" }, { "url": "lessons/classes-objects.html", - "revision": "d00d1b5fab1886f162cf8faf92a60f6c" + "revision": "a86a4f08417ea649c75dd6f6881b9208" }, { "url": "lessons/coding-challenge.html", - "revision": "ea3eb8a307fc0c72692aa38698140353" + "revision": "c1f9c50d11319dbdaa5b8c1581de2b8d" }, { "url": "lessons/comment.html", - "revision": "a6ea8856bfbabc5d734f549b7b4c7a69" + "revision": "cc55bfb99f9bd175e9d872cc7146b57d" }, { "url": "lessons/control-flow.html", - "revision": "705fdb1b3f648abeb73f8be6c6ee79a3" + "revision": "cb38ca49067a175d6b0b995b33787c83" }, { "url": "lessons/functions.html", - "revision": "2a8b42890f530115995dc47e95b09d0d" + "revision": "6d1765b682951a35f9ccf79dd41d3216" }, { "url": "lessons/index.html", - "revision": "53dae30db34b79f363cf20b2d13c54bf" + "revision": "4217149cb3dc9714c82ee53efe3069e4" }, { "url": "lessons/introduction.html", - "revision": "ad10e26b4e03b7e6d5b37f391a6cd4a0" + "revision": "7a2dd2eb40b422a3175aaa7ac29ae9d2" }, { "url": "lessons/make-executables.html", - "revision": "65179fbcbd7f085655286ad408221007" + "revision": "fc70fa267f6a7ef90b674cb76120320d" }, { "url": "lessons/mapping-data-type.html", - "revision": "eb5b05092492b6fbc0d677942188ebd2" + "revision": "7a713d379cd09f74702132be18061777" }, { "url": "lessons/modules.html", - "revision": "5ced53d8f49c6490c15df27ad325b32b" + "revision": "4e1251ee2437c83ac7516fb79bb89421" }, { "url": "lessons/operator.html", - "revision": "094ed30df52e9ae4d4052b1ddc47e7e7" + "revision": "1aae654ce2dab03516244edcea0a306a" }, { "url": "lessons/project-euler.html", - "revision": "c0bd74ad9b7c5c1fad5fa29ef87688f4" + "revision": "f48f4a1ade7a01795c362196b19a9694" }, { "url": "lessons/script.html", - "revision": "874f00aa79be89dd0244ae585ee686a5" + "revision": "d812637df86e65b67d2a99795dedad13" }, { "url": "lessons/sequence-data-type.html", - "revision": "73771a84f79b3081edde816db3993034" + "revision": "7def0993dbb5ec3e2017eba3078240ab" }, { "url": "lessons/set-data-type.html", - "revision": "50446b7923b740f2516338baed0efd5f" + "revision": "0a1be8e60d45f983d9e536d2091c89eb" }, { "url": "lessons/setup.html", - "revision": "9df2067108cc73ae28ed7459037d5815" + "revision": "07927c2be004f44b0050b371cc8491c9" }, { "url": "lessons/tiny-challenge.html", - "revision": "021135e75d99c4de7dbe7d7297428385" + "revision": "8e38ad70796b91b8301aced285580fec" }, { "url": "lessons/turtle.html", - "revision": "067c55ede58fe779d28f836d10ce551a" + "revision": "2413530e695b7cf9eaa373ac311faa11" }, { "url": "lessons/variable-and-data-types.html", - "revision": "14efcc2dcee6d0b2bd8038ad30d4276b" + "revision": "7911befbc7f9e6b6203fb632d76a651b" }, { "url": "lessons/version-control.html", - "revision": "807d5b987cf48d1e512aa0f292f3fb6a" + "revision": "602d0c22bf5cc8337951726ea8611469" }, { "url": "lessons/virtual-env.html", - "revision": "f893a6a9de86c80799c17b0eaf327628" + "revision": "0e49600aa29cb63c230e44583c60dbef" }, { "url": "logo.png", @@ -379,7 +379,7 @@ self.__precacheManifest = [ }, { "url": "tags.html", - "revision": "37d4e509887d2fae16f4c6c3fd32eadf" + "revision": "e4092062cc2aa0d65bd0a78b980bda74" } ].concat(self.__precacheManifest || []); workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); diff --git a/tags.html b/tags.html index 8a835bd..e969e52 100644 --- a/tags.html +++ b/tags.html @@ -16,7 +16,7 @@ - + @@ -74,7 +74,7 @@ Version Control

Virtual Environment -

- +
+