Python Tutorial 2016 Lesson 5.1 - ord() and chr() Functions

preview_player
Показать описание
Lesson 5.1 introduces two new functions to the series: First, the ord() function converts a single character in a string value to an integer. Next, the chr() function takes an integer value and converts it to it's string equivalent. Using these functions, we can do some interesting mathematical calculations on strings and create way to encode messages.

This is an introductory series of Python tutorials. This course, from start to finish, is designed to help someone who has never programmed before learn the basics of coding in Python. As this series continues, we examine more advanced Python techniques, functions, and methods.

Keep in mind this tutorial is using an older version of Python, v3.2.5. You will need to click on the "View Older Releases" button to use this specific version. Using the newer versions will not be an issue at this point, but when the lesson proceeds to basic graphics, the Pygame Module we'll use does not supports v3.2.5 only.
Рекомендации по теме
Комментарии
Автор

Thank you so so much for the help, man!

oodlesofawe
Автор

This video made so much more sense than most of the examples I've been going thru for these functions, excellent work.

cannonballbag
Автор

Steve, hope you are going to continue this series, much appreciated.

garrybeck
Автор

I am getting error: ord() expected a character, but string of length 0 found. Can you help me to solve this?

anmolpanesar