ข้ามไปที่เนื้อหาหลัก

บทความ

Object Final

 Final Examination OBJECT You will be given the "project name" and django project name. Inheritance 1 question Polymorphism 1 question (main.py) Django database 1 question Rest API → List items 1 question Rest API → Item detail 1 question Rest API → Transaction 1 question (Wallet App) ----------------------------------------------------------------------------------------------------------------------------- pip install django django-admin startproject mysite_project py manage.py startapp catalog_app  Create the database models in terminal py manage.py makemigrations py manage.py migrate py manage.py createsuperuser Rest API pip install djangorestframework pip install markdown       pip install django-filter pip install virtualenv --------------------------------------------------------------------------------------------------------------------------- พยายามติดตั้ง  py manage.py makemigrations py manage.py migrate ทุกครั้งหลังจาก เปลี่ยนรูปแบบโค้ด ตัว...
โพสต์ล่าสุด

OPPTH

 https://github.com/kongruksiamza/python-oop

OOPT01

 Lists: Lists are ordered collections that can contain elements of different types. They are mutable, meaning you can change their elements. Example: python Copy code my_list = [1, 2, "apple", True] my_list.append(5)  # Adding an element print(my_list[2])  # Accessing an element by index my_list.remove("apple")  # Removing an element print(my_list)  # Printing the modified list Dictionary: Dictionaries are unordered collections of key-value pairs. They use keys to access their associated values and are mutable. Example: python Copy code my_dict = {"name": "Alice", "age": 25, "city": "New York"} print(my_dict["age"])  # Accessing value by key my_dict["occupation"] = "Engineer"  # Adding a new key-value pair del my_dict["city"]  # Deleting a key-value pair print(my_dict)  # Printing the modified dictionary Ranges: Ranges are sequences of numbers used for iterating over a sequence...

OOP W

python object oriented  Student Class Attributes Student ID First name Last name Credits GPA Behaviors Enroll() Take_examination() class Student:     def __init__(self, student_id, first_name, last_name):         self.student_id = student_id         self.first_name = first_name         self.last_name = last_name         self.credits = 0         self.GPA = 0.0     def enroll(self, credits):         self.credits += credits     def take_examination(self, grade_points):         # Perform examination logic and calculate GPA based on grades         # For simplicity, let's assume grade_points are added to GPA directly         total_points = self.GPA * self.credits         self.credits += 1  # Assuming 1 credit for the examination         ...

OOP 22023

 https://github.com/omiejung01/PythonOO2_2023/tree/master01 https://github.com/omiejung01/PythonOO2_2023/tree/master02 Master 1 PythonOO2_2023/walletapp/data.py class Account:     def __init__(self,account_name,opening_balance):         self.account_name = account_name         self.balance = opening_balance     #Constructor     def display(self):         # Balance Inquiry         return self.account_name + ' ' + f"{self.balance:,.2f}"     def setAccountName(self, new_name):         self.account_name = new_name class Character:     def __init__(self, character_name, vision, weapon_type):         self.__character_name = character_name         self.__vision = vision         self.__weapon = None         self.__weapon_type = weapon_type     def displa...

Web Class note

https://github.com/omiejung01/Nuxt3WD2_2023/tree/master02 https://docs.google.com/document/d/1qikYS-WSpRosjIlUZEoOhzguigWx2-Mqamfyxcs67aE/edit Web Design https://drive.google.com/drive/folders/1kJvORymDwvcDtGoliUOHifsza3CdWsmH DBM Course https://drive.google.com/drive/folders/119ZWerKRLYNwf7G7dEA7ZKcBx9rOQoqV Web Design - Class note 13 Nov 2023 Course Syllabus Please go to https://tinyurl.com/webdesign002 And go to slides at  https://tinyurl.com/dbmcourse001 Slide: 01-How computer works Slide: 02-Programming Languages Slide #11: Try "Create game using PHP" Change PHP to C++ Change PHP to Unity Let's student try some queries <Solution> + <Languages Tools> Answer in “Student Interactive Board” Google Doc for your ATTN Todo: Check Visual Studio Code in your machine Goto Search Box type → VS Code Create new file Save file as hello.html Hello World in HTML Hello World in JavaScript Next Class - Slide: 03-Coding 101 Class: 20 Nov 2023 Slide: 03-Coding 101 Slide #19 ...