How to Code PYTHON: *Create and Import Module*

Published: 17 February 2021
on channel: Coding With Kids
124
4

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


On this page of the site you can watch the video online How to Code PYTHON: *Create and Import Module* with a duration of hours minute second in good quality, which was uploaded by the user Coding With Kids 17 February 2021, share the link with friends and acquaintances, this video has already been watched 124 times on youtube and it was liked by 4 viewers. Enjoy your viewing!