Posts

Python (Project after Level-2): Game coding with PyGame

  What software to use to learn Python(Integrated Development Environment: IDE). We will use  Visual Studio Code(VS Code)  later when you are used to Python. VScode is currently the most used editor by developers. https://code.visualstudio.com/ What is a module? https://www.w3schools.com/python/python_modules.asp Let's install pygame. https://www.pygame.org/wiki/GettingStarted  Windows Run VScode open terminal enter this pip install pygame if you see this message: You are using pip version 8.1.1, however version 10.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. enter this python -m pip install --upgrade pip and then, enter this once again pip install pygame Mac https://www.pygame.org/wiki/GettingStarted#Mac%20installation Short introduction to Class  We will learn more about the " class " later, but for now, let's study only what is necessary to use pygame library. https://www.w3schools.com/python/python_classes.as...

Python (Level-2): Data type, for Loop, String, Functions

4. Data types(intro) Data Types - As in other programming languages, data types are very important. - Since Python provides many practical data types, it is very important to clearly understand and use them. - For now, only the very basics of data types are covered. data types 01 data types 02 ###  [Self-Practice]   ###  5. loop statement:  for for loop  01 for loop  02 for loop  03 for loop  04 ###  [Self-Practice]   ###  6. Do you know the difference between 'keywords' and 'statement'? Keywords(Reserved Words) - What are keywords? - Literally meaning 'important word', it means that the programmer cannot change it. - Keywords may differ slightly depending on the Python version. difference between keywords_and_statements 7. Functions Python has several functions that are readily available for use. These functions are called built-in functions. In this page, you will find all the built-in functions in Python. we already have s...

Python (Level-4): Class Introduction

  Global, Local, Non-Local variables global_local_non-local variables Class Classes provide a means of bundling  data  and  functionality together . Creating a new class creates a new  type  of object, allowing new  instances  of that type to be made.  class_01 class_02 class_03 class_04  : class variables and methods(in detail) class_05 class_06 class_07

Python (Level-5): Class advanced( Inheritance, Polymorphism, Encapsulation, Access modifier, Class method, and Static method )

Image
Access Modifiers Object-oriented languages, like C++ and Java, use various keywords to control and restrict the resource usage of a class.  This is where keywords like  public ,  private and  protected  come into the picture. However, Python has a different way of providing the functionality of these access modifiers. class Modifiers: def __init__(self, name): self.__private_member = name # Private Attribute m = Modifiers("SKAUL05") print(m.__private_member) Let's study above topic using example code.

Python : ChatBot(using Regular Expression )

Image
Simple Chatbot EchoBot_01 EchoBot_02 EchoBot_03: using functions EchoBot_04: using class Google Search Bot ChatBot_01 ChatBot_02 ChatBot_03 Regular Expression. A RegEx, or Regular Expression, is a sequence of characters that forms a search pattern. RegEx can be used to check if a string contains the specified search pattern. Let's make a more flexible chatbot using Re.

Python : Web programming

Web Programming with Python Want to make a web program? Then you have to host your program, that is, you need your own web server.  Pyscript: Pyscript: - https://pyscript.net/ - https://pyscript.net/examples/ - https://github.com/pyscript/pyscript/blob/main/docs/tutorials/getting-started.md github: https://github.com/pyscript/pyscript course material: https://realpython.com/pyscript-python-in-browser/ https://levelup.gitconnected.com/pyscript-python-in-the-browser-4c1a578d67f3 github 에서의 호스팅 : https://opentutorials.org/course/3084/18891 https://www.youtube.com/watch?v=3DuyJf_XPtM&ab_channel=%EB%85%B8%EB%A7%88%EB%93%9C%EC%BD%94%EB%8D%94NomadCoders

Python (Level-3): Data Types

Image
Important Primitive Data Types. Python provides a wide variety of primitive data types.  Among them, data types such as List, Tuple, Dictionary, and Set are the most essential parts of Python. - String,  List, Tuple, Dictionary, and Set String(in detail) Let's have a look the string data type in detail 5. Let's take a look at String data type in detail. String data types is really important because chatting is done through words(writing). Let's study followings. - string literals - string formatting - string operations string data type_1 Let's take a closer look at the indexing of strings. string data type_2 Let's take a look at string-related member functions. - It's about a 'class' you haven't learned yet, but... string data type_3 - This is a class-related explanation, but the function has not yet been explained in detail... so it can be a little difficult to understand. Let's remember one thing. - In Python, everything is an object, followe...