PythonByteSize
  • Home
  • Video Index
    • 1. The Basics
    • 2. Python Program Structures
    • 3. Python Operators
    • 4. Python Functions
    • 5. Introduction to Classes and Objects
    • 6. Python Strings
    • 7. User Defined Functions
    • 8. Classes and Objects
    • 9. Python Dictionaries
    • 10. Python tkinter
    • 11. Python Lists
    • 12. Python Namespaces
    • 13. Turtle Graphics
    • 14. Python Tips
    • 15. Complex Numbers
  • 1-Minute Videos
  • Exercise Index
    • 1. The Basics Exercises
    • 2. Python Program Structures Exercises
    • 3. Python Operators Exercises
    • 4. Python Functions Exercises
  • Donate
  • Computing Topics
  • Mathematics
  • Educators
  • Contact
  • About

Exercise 4.2 (Pythons chr() function)


1. Ensure you have viewed the video (associated with this exercise) at this link >> 

2. In your own words describe what is meant by an alphanumeric character. 

3. Compare and contrast the following two functions:

​ord()

chr()

4. Use a for ... loop, the range() and the chr() functions to output the uppercase characters from A through to Z together with the number that represents each character.

5. What is the output of the following program?
Exercise 4.2. Example 1

    

6. What is the output of the following program?
Exercise 4.2. Example 2

    

7. In your own words describe the unicode character set and what it is used for.

8. chr() is an example of a built-in function. With reference to the Python programming language describe in your own words built-in functions?

END    Next Exercise >>

Please consider donating to help with the costs incurred in developing this website.             Donate >>