Python:  Postal Code Programming Exercise (Ep. 1)
Channel: Christian Hur
Date: 2020-10-11

⭕ Overview
In this video, I'll guide you through writing a simple Python program to print the barcode of a five-digit ZIP code to the console. We'll start by understanding the structure of a typical barcode used in the US mailing system, breaking down how each digit of the ZIP code translates into the barcode format.

I'll walk you through the step-by-step process of converting a ZIP code into its corresponding barcode representation. This involves understanding the individual bars and their meanings and how to translate them into a format that can be printed on the console.

Write a program that asks the user for a zip code and prints the bar code. Use : for half bars, | for full bars. For example, the encoding scheme for a five-digit zip code 95014 becomes:

||:|:::|:|:||::::::||:|::|:::|||

Provide and implement these functions:
def main() # Main entry to start the program
def getDigit() # Reads and return the 5-digit zip code
def printDigit(d) # Prints the bar code for a digit
def printBarCode(zipCode) # Prints the encoded bar code

By the end of this tutorial, you'll have a functional Python program that can generate barcodes from ZIP codes, enhancing your skills in data representation and Python programming.

If you find this video helpful, please give it a thumbs up, share it with your friends, and subscribe to my channel for more tutorials and insights into programming. Your support helps me create more content to assist you in your learning journey. Thank you for watching!

⭕ Chapters
  0:00 - Introduction
  4:48 - Coding
  6:30 - The main() function
  7:45 - The getDigit() function
  8:32 - The printBarCode() function
11:22 - The printDigit() function
16:00 - The getCodeDigits() function
18:45 - The calculateCheckDigit() function
23:41 - Final code check
24:35 - Run program

⭕ About me
I am a Web instructor and author for Linkedin Learning (formerly Lynda.com), Packt, E-C Council, Udemy, and MC Press.

⭕ Visit my site: https://christianhur.com
⭕ My complete online training courses:
      ☑️ REST APIs & AJAX Operations Using Node, Express, and jQuery:  https://www.udemy.com/course/rest-apis-ajax-operations-using-node-express-and-jquery/?referralCode=A762AE70D9FD6A931F9B
https://www.udemy.com/course/build-clean-and-secure-php-web-apps-from-scratch/?referralCode=C200BB52F0C7153B93CC
      ☑️ Build Clean and Secure PHP Web Apps from Scratch: 
https://www.udemy.com/course/build-clean-and-secure-php-web-apps-from-scratch/?referralCode=C200BB52F0C7153B93CC
      ☑️ The DOM in JavaScript, jQuery, AngularJS, and React : https://www.linkedin.com/learning/the-dom-in-javascript-jquery-angularjs-and-react
      ☑️ Building JSF Web Applications with Java EE 7:  https://www.linkedin.com/learning/building-jsf-web-applications-with-java-ee-7
      ☑️ Troubleshooting Vue.js:  https://www.packtpub.com/application-development/troubleshooting-vuejs-video
      ☑️ Angular 7 New Features:  https://www.packtpub.com/web-development/angular-7-new-features-video
      ☑️ Full-Stack Web Development with Flask: https://www.packtpub.com/web-development/full-stack-web-development-flask-video
      ☑️ Full-Stack Web Development with Django & Angular 8: https://www.packtpub.com/web-development/full-stack-web-development-with-django-and-angular-8-video
      ☑️ Angular 9 New Features:  https://www.packtpub.com/web-development/angular-9-new-features-video

⭕ Check out my book:
Developing Business Applications for the Web: With HTML, CSS, JSP, PHP, ASP.NET, and JavaScript is available on Amazon and MC Press. 
      ☑️ Link:  https://www.mc-store.com/collections/christian-hur/products/developing-business-applications-for-the-web-with-html-css-jsp-php-asp-net-and-javascript