Book Image

Python By Example [Video]

By : Burkhard Meier
Book Image

Python By Example [Video]

By: Burkhard Meier

Overview of this book

<p><span id="description" class="sugar_field">This video course explores Python basics, data structures, and algorithms. We'll build a die rolling simulator to see how to use Python dictionaries, loops, functions, and control statements. </span></p> <p><span id="description" class="sugar_field">Then, we will see how we can develop dictionaries that contain other dictionaries to build complex data structures. </span></p> <p><span id="description" class="sugar_field">Next we will use a modular approach to build a game that consists of a deck of playing cards. We will use object-oriented (OOP) Python classes to do so. We will display the playing cards both in a textual form, which we create, as well as via image files. This will lead to our displaying card images in a graphical form using Python's built-in Tkinter package.</span></p> <p><span id="description" class="sugar_field">In the next part, we will use multiple inheritance with OOP classes. While the Java and C# programming languages are limited to only single inheritance, Python classes can inherit from multiple classes. You will learn how to use multiple inheritance with Python.</span></p> <p><span id="description" class="sugar_field">You will also build Graphical User Interfaces (GUIs). We will use Python's built-in Tkinter package and delve more deeply into GUI programming.</span></p> <p><span id="description" class="sugar_field">By the end of this video tutorial, you will have built some useful utilities using Python. Python is very strong at searching directory folders, replacing words within modules, and much more. You will find these utilities useful in your everyday work as a developer.</span></p> <p><span id="description" class="sugar_field">All codes are added at <a style="font-weight: normal;" href="https://github.com/PacktPublishing/-Python-By-Example" target="_new">https://github.com/PacktPublishing/-Python-By-Example</a></span></p> <h1>Style and Approach</h1> <p>Step by step approach to build various apps and games using Python</p>
Table of Contents (5 chapters)
Chapter 2
Developing a Game of Deck of Cards
Content Locked
Section 3
Correctly Sizing Image Files
We find some nice free image files of playing cards on the internet but they are either too large or too small so we want to resize them to fit our application. - Install Pillow and use the Image module - Convert Unicode cards into 16-bit surrogate pairs. - Use tkinter to display png and Unicode cards