Python: Postal Code Programming Exercise (Ep. 1)

Опубликовано: 11 Октябрь 2020
на канале: Christian Hur
2,604
19

⭕ 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-api...
https://www.udemy.com/course/build-cl...
☑️ Build Clean and Secure PHP Web Apps from Scratch:
https://www.udemy.com/course/build-cl...
☑️ The DOM in JavaScript, jQuery, AngularJS, and React :   / the-dom-in-javascript-jquery-angularjs-and...  
☑️ Building JSF Web Applications with Java EE 7:   / building-jsf-web-applications-with-java-ee-7  
☑️ Troubleshooting Vue.js: https://www.packtpub.com/application-...
☑️ Angular 7 New Features: https://www.packtpub.com/web-developm...
☑️ Full-Stack Web Development with Flask: https://www.packtpub.com/web-developm...
☑️ Full-Stack Web Development with Django & Angular 8: https://www.packtpub.com/web-developm...
☑️ Angular 9 New Features: https://www.packtpub.com/web-developm...

⭕ 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/...


На этой странице сайта вы можете посмотреть видео онлайн Python: Postal Code Programming Exercise (Ep. 1) длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Christian Hur 11 Октябрь 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,604 раз и оно понравилось 19 зрителям. Приятного просмотра!