Do you want to be the very best like no one ever was? Well today I’m going to show you how to create your very own python Pokemon battle game.
This video is intended for beginners, and will introduce you to python classes. I highly recommend coding along with me. If you are new to this channel please click that subscribe button for python programming content :D
Now we are ready to create a class. If you have never created a class in python before, don’t worry, it’s not hard. A class is kind of like functions of functions; they allow you to create objects that have attributes. In our case we can write a class and use it to create Pokemon objects. Each Pokemon will have its unique attributes, like type and attack power.
If you’re still confused don’t worry, just keep coding with me and I think you’ll get it.
In python to create our pokemon class we write the word class and then the name of the class with a colon. now anything we put indented (inside of this class) will be able to be used by any pokemon objects we create.
Let’s add a function to our class called __init__. This is a built-in function name for classes. The __init__ function will be the initialization. In other words, when you create a new pokemon object, it will be as if you are calling this __init__ function.
This is the place we want to include any attributes that a pokemon initially has. We will try to keep this simple.
And for now, every time you create a function inside your class, make sure the first parameter is self.
This video creates a python class from scratch. This is a Python anaconda tutorial for help with coding, programming, or computer science. These are short python videos dedicated to troubleshooting python problems and learning Python syntax. For more videos see Python Marathon playlist by Rylan Fowers.
⬇️Check out the video clips used in this video (All are intended with fair use):
Pokemon School #2:
https://www.youtube.com/watch?v=D1RyffVZ-6s
#PythonMarathon #LearnPython #PythonTutorial Python Pokemon - Python Class Tutorial for Beginners. Pokémon Coding Tutorial - CS50's Intro to Game Development. Looking at the Code that Made Pokémon Red. Code your own Pokemon game. Pocket Code for Android - APK Download. Pokemon Trading Card Game Online Codes. Free Pokémon TCGO Game Codes | Game codes, Coding, Pokemon tcg online. How to Redeem Pokemon TCG Online Code Cards on iPad! (UPDATED 2021) - YouTube. Free Pokémon TCG Codes Part #1 - Pokemon Trading Card Game Pokémon Online Codes - YouTube. Code.org RPG Game - Pokemon Dojo Part 1 - YouTube.