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
  • Exercise Index
    • 1. The Basics Exercises
    • 2. Python Program Structures Exercises
    • 3. Python Operators Exercises
    • 4. Python Functions Exercises
  • Educators
  • Donate
  • Contact
  • Computing Topics
  • Mathematics
  • About
Video Index

Section 1. The Basics

  1. How to Download and Install Python >>
  2. "Hello World" (Python 3 Command Line) >>
  3. "Hello World" (Python 3 GUI) >>
  4. Python Keyboard Input >>
  5. Python Program Design >>
  6. Coding a Design in Python >>
  7. Testing a Python Program >>
  8. Python Variables and Data Types >>
  9. Python Assignment Statement >>
  10. Python Assignment Operators >>
  11. Python Augmented Assignment Operators >>
  12. Naming Python Variables >>
  13. Pythons Case Sensitivity >>
  14. A Python Variable versus a Python Object >>
  15. Immutable Object >>
  16. Object References >>
  17. Copying Object References >>

Section 2. Python Structures (Sequence, Selection and Iteration)

  1. The Sequence Structure >>
  2. The if  Selection Construct >>
  3. The if... else Selection Construct >>
  4. Boundary testing the if ... else Selection Construct >>
  5. Nested Selection Constructs >> 
  6. The elif Selection Construct >>
  7. The while iteration (repetition loop) >> 

Section 3. Python Operators

  1. Pythons Relational Operators (making decisions) >>
  2. Multiple Conditional Tests (and paths) in a Python program >>
  3. Pythons range function >>
  4. The for loop iteration >> 
  5. Pythons Arithmetic Operators >> 
  6. Pythons % Operator >> 
  7. Pythons logical operators (and, or & not) >> 
  8. Pythons logical and operator >> 
  9. Operator Precedence >> 
  10. Multiple Assignment >>
  11. Multiple Assignment and Trace Tables >>
  12. Simultaneous Assignment >>

Section 4. Python Functions

  1. Pythons ord() function >>
  2. Pythons chr() function >>
  3. Pythons eval()function >>
  4. Pythons print function >>
  5. Pythons abs function >>
  6. Pythons type function >>
  7. Pythons id() function >>
  8. Pythons id() function and names >>

Section 5. Introduction to Classes and Objects

  1. Python Class and Object >>
  2. Python Binding a Name to an Object >>
  3. Python String Class and Object >>
  4. Python An Empty String >>
  5. A Python String is Immutable >>
  6. Binding to an Existing String Object >>
  7. Python Augmented Operators and Binding to Objects >>

Section 6. Python Strings

  1. Finding the length of a Python String >>
  2. Iterating over a Python String >>
  3. Forward Indexing Over a Python String >>
  4. Python Forward Indexing Example >>
  5. Backward Indexing Over a Python String >>
  6. Python Backward Indexing Example >>
  7. Counting words in a simple sentence (Python string) >>
  8. Python String Replicator Operator >>
  9. Python Class and Object Relationship >>
  10. Messaging a Python String Object >>
  11. Python Using the split() method to count words in a string >>
  12. Pythons string capitalize method >>
  13. How to count the number of sub-strings in a string using Python >>
  14. Python String Slicing >>
  15. Python String Slicing Examples >>
  16. Python String Slicing More Examples >>
  17. Python String Slicing Additional Examples >>
  18. How to Reverse a Python String >>
  19. Extracting a URL from a Python String >>
  20. The Python find() String method >>
  21. Python find() method examples >>
  22. The Python index() method and exceptions >>
  23. The endswith() method >>

Section 7. User Defined Function

  1. Why we have Python functions >>
  2. Python User Defined Function >>
  3. How to design a Python function >>
  4. Python Function with arguments and no return value >>
  5. Python Function with no arguments but return value >>
  6. Python Function with no arguments and no return value >
  7. Python Keyword Arguments for functions >>
  8. Python Default Arguments for functions >>
  9. Local and Global Variable Scope >>
  10. Lifetime of Variables >>
  11. In functions do not directly access global variable >>
  12. Python Parameter Passing Mechanism >>

Section 8. Classes and Objects

  1. Python Class >>
  2. ​Python Class Members >>
  3. Constructing and Assigning a Python Object >>
  4. Python Methods and self >>
  5. ​Pythons self parameter >>
  6. Python Method Parameters and self >>
  7. A Python Instance Method >> 
  8. Pythons __init__  method >>
  9. Python Instance Variables >>
  10. Local variables in Python methods >>
  11. Messaging a Python Object >>
  12. Designing a Python Class >>
  13. Building a Python Class >>
  14. Creating an Instance of a Python Class >>
  15. Python getter and setter Methods >>
  16. Python Why Data Hiding? >>
  17. Pythons Data Hiding Convention >>

Section 9. Python Dictionary

  1. Python Dictionary >>
  2. Adding Key Value Items to a Python Dictionary >>
  3. Deleting and Clearing Python Dictionary items >>
  4. A Python Dictionary is an Object >>
  5. Pythons dict class popitem() method >>
  6. Pythons dict class keys() method >>
  7. Pythons dict class values() method >>
  8. Pythons dict class get() method >>
  9. Pythons dict class items() method >>
  10. Pythons dict class update() method >>
  11. Python Immutable and Mutable Types >>
  12. A Python list is Mutable >>
  13. A Python Mutable list storing Immutable types >>
  14. ​Allowable types for Dictionary Keys >>

Section 10. Python tkinter

  1. Introduction to tkinter >>
  2. tkinter objects >>
  3. How to set the title of a Python tkinter window >>
  4. tkinter events and mainloop() >>
  5. How to set the background colour of a Python tkinter window >>
  6. Setting the Size of a tkinter Window >>
  7. How to set the location of a Python tkinter window >>
  8. Creating a fixed size Python tkinter window >>
  9. How to place a Python tkinter window in the center of the screen >>
  10. Introduction to the tkinter Label widget >>
  11. Setting the font type, font colour and font size of a label >>
  12. Setting the width of a tkinter label >>
  13. Displaying multiple lines of text in a Python tkinter label >>
  14. Setting the look of the border of a Python tkinter label >>
  15. Setting the height of a Python tkinter label >>
  16. Positioning text within a Python tkinter label >>
  17. How to pad space around the text of Python tkinter label >>
  18. How to justify text in a Python tkinter label >>
  19. How to anchor and justify text in a Python tkinter label >>
  20. How to access the options of a Python tkinter label >>
  21. Dynamically altering a Python tkinter label >>
  22. The Python tkinter keys() method for a label >>
  23. Using StringVar and textvariable with a Python tkinter label >>
  24. The Python tkinter StringVar set() method >>
  25. Introduction to the Python tkinter button widget​ >>
  26. The tkinter Grid Geometry Manager >>
  27. Designing a Simple tkinter GUI >>
  28. ​The tkinter Entry Widget >>
  29. The Entry widget and StringVar() >>
  30. Fahrenheit to Celsius Python GUI >>
  31. Alternative Python Fahrenheit to Celsius GUI​ >>
  32. Setting the focus within a Python GUI >>
  33. Focus and Tab order of Widgets in a Python GUI >>
  34. Introduction to the Python tkinter Frame widget >>
  35. Building a Python tkinter GUI using Frames >>
  36. Adding Frames to a Python tkinter window >>​
  37. How to Inherit from a Python tkinter Frame >>
  38. The id and type of a Widget that inherits from a Python tkinter Frame >>
  39. The need for the __init__  method and self parameter when inheriting with tkinter >>
  40. Using the Python help function to assist with inheritance >>​
  41. Using Inheritance to Build a Python tkinter GUI >>
  42. Fullscreen window using tkinter >>
  43. Fullscreen tkinter window using the f string >>
  44. Introduction to the Python tkinter Canvas widget >>
  45. How to draw a line in Python using tkinter >>
  46. Hexadecimal colour (color) codes for Python tkinter graphics >>
  47. ​How to generate a random colour (color) in Python >>
  48. How to draw Random Coloured lines in Python tkinter >>
  49. Using the f string to set random Python colours >>
  50. Drawing shapes on a tkinter Canvas using lines >>
  51. ​How to draw arrowhead lines on a Python tkinter Canvas​ >>
  52. Shaping the arrowhead of a line in tkinter >>
  53. ​Drawing and deleting lines on a tkinter canvas >>
  54. Drawing lines on a tkinter Canvas with mouse clicks >>
  55. Accessing the coordinate position of a mouse click >>
  56. Drawing a line between two mouse clicks using tkinter >>
  57. Building a tkinter App with a class >>
  58. Describing a tkinter App built with a class >>
  59. Creating tkinter Apps from a class >>
  60. Python Namespaces, name conflicts and tkinter >>
  61. Python Namespaces >>
  62. Displaying a Python Namespace >>
  63. Python and Multiple Namespaces >>
  64. ​Python Namespace and Local Scope >>
  65. Python Global Namespace >>
  66. ​Avoiding tkinter naming conflicts >>
  67. Introduction to the Python tkinter Menu widget >>
  68. Adding menu items to a Python tkinter menubar >>
  69. Using tkinter and Python to create a submenu >>
  70. The tearoff option for a Python tkinter menu >>
  71. Using separators to group Python tkinter menu items >>
  72. Displaying the current time in a Python tkinter window >>
  73. A Digital clock built with Python tkinter >>
  74. A Digital Clock built with Object Oriented Python and tkinter >>
  75. Cosmetically Refactoring Python tkinter code >>

Section 11. Python Lists

  1. Introduction to the Python List >>
  2. Creating Python lists >>
  3. Accessing the elements of a Python list >>
  4. Creating and initialising a fixed size Python list >>
  5. Navigating a Python list within a while loop >>
  6. The Python len function and lists >>
  7. Using the for loop and the while loop with a Python list >>
  8. Using the max function with Python lists >>
  9. Using the min function with Python lists >>
  10. Using the min function with Python lists >>
  11. How to reverse a Python list >>
  12. How to append to a Python list >>
  13. How to extend a Python list >>

Section 12. Python Namespaces

  1. Python Namespaces, name conflicts and tkinter >>
  2. Python Namespaces >>
  3. Displaying a Python Namespace >>
  4. Python and Multiple Namespaces >>
  5. Python Namespace and Local Scope >>
  6. Python Global Namespace >>
  7. Avoiding tkinter naming conflicts >>​

Section 13. Turtle Graphics

  1. Introduction to Turtle Graphics >>
  2. Turtle Graphics in Python >>
  3. Python turtle Screen class >>
  4. Python turtle Screen exitonclick() method >>
  5. Setting the background color of a Python turtle screen >>
  6. How to set the size of a Python turtle screen >>
  7. How to set the POSITION of a Python turtle screen >>
  8. Moving the turtle forward and backward in Python >>
  9. Drawing a Square in Python using Turtle >>
  10. Drawing a Turtle Square using a Python loop >>
  11. How to set the drawing colour in Python turtle graphics >>
  12. Setting the thickness of Python turtle lines >>
  13. Filling a turtle drawn shape with a colour >>
  14. How to hide the turtle when it is drawing >>

Section 14. Python Tips

  1. Python Tip: Constants and Reading large numbers in Python >>
  2. Python Tip: Frequencies of values in a list >>
  3. Python Tip: Most frequently occurring value in a Python list >>​
  4. Python Tip: Returning multiple values from a function >>
  5. Python Tip: Python ‘==‘ versus ‘is’ >>
  6. Python Tip: The Immutable Integer >>
  7. Python Tip: The Immutable Float >>
  8. Python Tip: First Class Objects >>
Please consider donating to help with the costs incurred in developing this website.             Donate >>