Let's get started! 🔥🔥🔥 In this video, we will write few PYTHON 🐍 scripts to demonstrate how to define a module to hold one or more functions ♻️. In this tutorial, we add code to create a deck of cards 🃏🤏 in the new deck module. Next in a different code file, we import the deck module and then call the create_deck() method of the deck module. You will learn some basics in less than 5 minutes!
In this video, you will learn how to:
★ 0:07 Create a deck module to separate out reusable code in a modular way
★ 1:29 Use the import statement to access a module's functions
Tips and Tricks:
► A Python module is simply a code file containing files, constants, or services. Creating a module lets us separate out reusable code in a modular way. By placing functions in a module, we make that code usable from other code files both inside and outside our programs. We can use the import statement to access a module's functions.
► We can split a program into multiple code files to increase code modularity and reuse across the entire program.
► Modules even let multiple programs share the same code.
► We can import modules in the first lines of code.
WATCH MORE PYTHON TUTORIALS 🐍
• 🐍 Python Coding for Beginners
For the setup, please read the followings before you begin:
1. Download latest Python: https://www.python.org/downloads/
2. Install Python and remember to select "Add Python... to PATH" when asked.
3. Download and install latest Visual Studio Code: https://code.visualstudio.com/Download
4. Install the Python extension for Visual Studio Code: Go to View and select Extensions, or select the Extensions icon, then search for python.
Python - a programming language used by world-class companies such as Amazon.com, Alphabet (Google), Facebook, Twitter, and NASA.
👇 SUBSCRIBE TO CODING WITH KIDS 👨🏻💻👩🏻💻 YOUTUBE CHANNEL NOW 👇
https://youtube.com/CodingWithKids?su...
#CodingWithKids #PythonProgramming #PythonForBeginners
Auf dieser Seite können Sie das Online-Video How to Code PYTHON: *Create and Import Module* mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Coding With Kids 17 Februar 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 124 Mal angesehen und es wurde von 4 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!