🔥 เพื่อน ๆ รู้กันไหมว่า เจ้าตัว Function ของ Python นั้น สามารถ Return ค่าได้มากกว่า 1 ค่า !!
.
👉 ซึ่งจากปกติแล้วการ Return ค่าของ Function (Java เรียกว่า Method) ในภาษา C, C++ หรือ Java จะสามารถส่งค่ากลับได้แค่ค่าเดียวเท่านั้น ถ้าเราต้องการที่จะส่งกลับค่าออกมาจาก Function ที่มากกว่าหนึ่งตัว เราจะใช้หลักการ Return ค่ากลับออกมาเป็น Array, List หรือ Class ของ Java (หรืออื่น ๆ ที่สามารถรวมข้อมูลหลาย ๆ ตัวเป็นก้อนเดียวได้)
.
✨ แต่เจ้าตัว Python นั้นสามารถ Return ตัวแปรหลาย ๆ ตัวออกมาได้ทันที โดยที่เราไม่จำเป็นต้องอัดข้อมูลให้เป็นก้อนเดียวก่อนส่งออก เพราะเจ้าตัว Function จะทำการ Pack ข้อมูลเป็น Tuple ให้เองเลยโดยอัตโนมัติ (Tuple คือกลุ่มข้อมูลที่มีรูปแบบคล้าย List แต่ไม่สามารถแก้ไขข้อมูลในนั้นได้)
.
📑 ตัวอย่างเช่น เราต้องการที่จะส่งค่าตัวแปรกลับ 3 ตัว เราก็สามารถใช้ตัวแปร 3 ตัวในการรอเก็บค่าที่ส่งออกจาก Function ได้ทันทีเลย แบบดังรูป (สุดท้ายเจ้า Function ของ Python ก็ return ออกมาแค่ค่าเดียวนั่นแหละ นั่นก็คือ Tuple นั่นเอง)
.
borntoDev - 🦖 สร้างการเรียนรู้ที่ดีสำหรับสายไอทีในทุกวัน
同時也有5部Youtube影片,追蹤數超過17萬的網紅魏巍,也在其Youtube影片中提到,記錄學習 python 語言的物件導向程式設計基礎。從最簡單的類別開始,到加入 init 方法、 instance attribute、 class attribute 一直到 instance methed,還有 class method。其實 python 的那個 attribute 應該就是其...
python class method 在 โปรแกรมเมอร์ไทย Thai programmer Facebook 的最佳解答
ในวิชา "วิทยาการคำนวณ" ระดับชั้น ม. 5
ได้ดึงวิชา data science (วิทยาศาสตร์ข้อมูล)
มาปูพื้นฐานให้เด็กๆ ได้เรียนกันแล้ว นับว่าเป็นโชคดี
เพราะวิชาพวกนี้เป็นของสูง กว่าจะสัมผัสก็คงตอนป.ตรี โท เอก
...Continue ReadingIn the subject of ′′ Calculation Theology ′′ class. 5
Pulled data science (data science)
Let's master the foundation for kids to learn. It's considered lucky.
Because these subjects are high to touch. It's probably in the middle of the year. Tri To Aek
Which I will review the content to read roughly. The content is divided into 4 chapters.
.
👉 ++++ Chapter 1-Information is valuable +++++
.
Data science in the textbook. Used by Thai name as ′′ Information Science ′′
This chapter will mention Big Data or big data with lots of valuable information.
And so much role in this 4.0 s both public and private sector.
.
If you can't imagine when you played Google search network, you'll find a lot of information that you can use in our business. This is why data science plays a very important role.
.
It's not surprising that it makes the Data Scientist s' career (British name data scientist) play the most important role and charming and interesting profession of the 21th century.
.
Data science, if in the book, he defines it
′′ Study of the process, method or technique to process enormous amounts of data to process to obtain knowledge, understand phenomena, or interpret prediction or prediction, find out patterns or trends from information.
and can be analysed to advise the right choice or take decision for maximum benefit
.
For Data science work, he will have the following steps.
- Questioning my own interest.
- Collect information.
- Data Survey
- Data Analysis (analyze the data)
- Communication and Results Visualization (Communicate and visualize the results)
.
🤔 Also he talks about design thinking... but what is it?
Must say the job of a data scientist
It doesn't end just taking the data we analyzed.
Let's show people how to understand.
.
The application design process is still required.
To use data from our analytics
The word design thinking is the idea. The more good designer it is.
Which Data Scientists Should Have To Design Final Applications
Will meet user demand
.
👉 ++++ Chapter 2 Collection and Exploration +++++
.
This chapter is just going to base.
2.1 Collection of data
In this chapter, I will talk about information that is a virtual thing.
We need to use this internet.
2.2 Data preparation (data preparation)
Content will be available.
- Data Cleaning (data cleansing)
- Data Transformation (data transformation)
In the university. 5 is not much but if in college level, you will find advanced technique like PCA.
- Info Link (combining data)
2.3 Data Exploration (data exploration)
Speaking of using graphs, let's explore the information e
Histogram graph. Box plot diagram (box plot). Distributed diagram (scatter plot)
With an example of programming, pulls out the plot to graph from csv (or xls) file.
2.4 Personal Information
For this topic, if a data scientist is implementing personal data, it must be kept secret.
.
Where the issues of personal information are now available. Personal Data Protection is Done
.
.
👉 ++++ Chapter 3 Data Analysis ++++
.
Divided into 2 parts:
.
3.1 descriptive analysis (descriptive analytics)
Analyzing using the numbers we've studied since
- Proportion or percentage
- Medium measurement of data, average, popular base.
Correlation (Correlation) relationship with programming is easy.
.
.
3.2 predictive analysis (predictive analytics)
.
- numeric prediction is discussed. (numeric prediction)
- Speaking of technique linear regression, a straight line equation that will predict future information.
Including sum of squared errors
Let's see if the straight line graph is fit with the information. (with programming samples)
- Finally mentioned K-NN (K-Nearest Neighbors: K-NN) is the closest way to finding K-N-Neighborhood for classification (Category)
*** Note *****
linear regression กับ K-NN
This is also an algorithm. One of the machine learning (machine learning, one branch of AI)
Kids in the middle of the day, I get to study.
.
.
👉 +++ Chapter 4 Making information pictured and communicating with information +++
.
This chapter doesn't matter much. Think about the scientist after analyzing what data is done. The end is showing it to other people by doing data visualization. (Better summoning)
.
In contents, it's for example using a stick chart, line chart, circular chart, distribution plan.
.
The last thing I can't do is tell a story from information (data story telling) with a message. Be careful when you present information.
.
.
.
*** this note ***
😗 Program language which textbooks mentioned and for example.
It's also python and R language
.
For R language, many people may not be familiar.
The IT graduate may be more familiar with Python.
But anyone from the record line will surely be familiar.
Because R language is very popular in statistical line
And it can be used in data science. Easy and popular. Python
.
But if people from data science move to another line of AI
It's deep learning (deep learning)
Python will be popular with eating.
.
.
#########
😓 Ending. Even I wrote a review myself, I still feel that.
- The university. 5 is it going to be hard? Can a child imagine? What did she do?
- Or was it right that I packed this course into Big Data era?
You can comment.
.
But for sure, both parents and teachers are tired.
Because it's a new content. It's real.
Keep fighting. Thai kids 4.0
.
Note in the review section of the university's textbook. 4 There will be 3 chapters. Read at.
https://www.facebook.com/programmerthai/photos/a.1406027003020480/2403432436613260/?type=3&theater
.
++++++++++++++++++++
Before leaving, let's ask for publicity.
++++++++++++++++++++
Recommend the book ′′ Artificial Intelligence (AI) is not difficult ′′
It can be understood by the number. End of book 1 (Thai language content)
Best seller ranked
In the MEB computer book category.
.
The contents will describe Artificial Intelligence (A) in view of the number. The end.
Without a code of dizzy
With colorful illustrations to see, easy to read.
.
If you are interested, you can order.
👉 https://www.mebmarket.com/web/index.php?action=BookDetails&data=YToyOntzOjc6InVzZXJfaWQiO3M6NzoiMTcyNTQ4MyI7czo3OiJib29rX2lkIjtzOjY6IjEwODI0NiI7fQ&fbclid=IwAR11zxJea0OnJy5tbfIlSxo4UQmsemh_8TuBF0ddjJQzzliMFFoFz1AtTo4
.
Personal like the book. You can see this link.
👉 https://www.dropbox.com/s/fg8l38hc0k9b0md/chapter_example.pdf?dl=0
.
Sorry, paper book. I don't have it yet. Sorry.
.
✍ Written by Thai programmer thai progammerTranslated
python class method 在 魏巍 Youtube 的最讚貼文
記錄學習 python 語言的物件導向程式設計基礎。從最簡單的類別開始,到加入 init 方法、
instance attribute、 class attribute 一直到 instance methed,還有 class method。其實 python 的那個 attribute 應該就是其他語言的 property 吧?
$$ 訂閱《魏巍》頻道吧~ https://bit.ly/2EIy6Rz
-----------------------------------------------------------------------------------------------------------
***** 訂閱魏巍頻道 ***** @@ ***** 跟我一起玩遊戲 *****
***** 還會分享各種有趣的短片** @@ ** 趕快去訂閱吧! *****,
-----------------------------------------------------------------------------------------------------------------------
#python #programming #魏巍

python class method 在 prasertcbs Youtube 的精選貼文
เข้าใจขอบเขตการเข้าถึงตัวแปร และหลักการเรียกใช้ตัวแปรในกรณีที่มีการสร้างตัวแปรที่มีชื่อเดียวกันใน Class, Method และ Block
============
playlist สอนภาษา C# เบื้องต้น
https://www.youtube.com/watch?v=bu6kwrpOqFM&list=PLoTScYm9O0GE4trr-XPozJRwaY7V9hx8K
============
playlist สอนภาษา C เบื้องต้น
https://www.youtube.com/watch?v=Z_u8Nh_Zlqc&list=PLoTScYm9O0GHHgz0S1tSyIl7vkG0y105z
============
playlist สอนภาษา C++ เบื้องต้น
https://www.youtube.com/watch?v=_NHyJBIxc40&list=PLoTScYm9O0GEfZwqM2KyCBcPTVsc6cU_i
============
playlist สอนภาษาจาวา Java เบื้องต้น
https://www.youtube.com/watch?v=O3rW9JvADfU&list=PLoTScYm9O0GF26yW0zVc2rzjkygafsILN
============
playlist สอนการทำ Unit Test ภาษาจาวา Java
https://www.youtube.com/watch?v=R11yg8hKApU&list=PLoTScYm9O0GHiK3KNdH_PrNB0G3-kb1Bi
============
playlist สอนภาษาไพธอน Python เบื้องต้น
https://www.youtube.com/watch?v=DI7eca5Kzdc&list=PLoTScYm9O0GH4YQs9t4tf2RIYolHt_YwW
============
playlist สอนภาษาไพธอน Python การเขียนโปรแกรมเชิงวัตถุ (OOP: Object-Oriented Programming)
https://www.youtube.com/watch?v=4bVBSluxJNI&list=PLoTScYm9O0GF_wbU-7layLaSuHjzhIRc9
============
playlist สอนภาษา R เบื้องต้น
https://www.youtube.com/watch?v=oy4qViQLXsI&list=PLoTScYm9O0GF6qjrRuZFSHdnBXD2KVICp
============
playlist สอนภาษา PHP เบื้องต้น
https://www.youtube.com/watch?v=zlRDiXjYVo4&list=PLoTScYm9O0GH_6LARFxozL_viEsXV2wgO
============
เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่
https://www.youtube.com/subscription_center?add_user=prasertcbs

python class method 在 prasertcbs Youtube 的最佳貼文
วิธีการสร้าง abstract class ที่ไม่อนุญาตให้มีการสร้าง instance ได้
เราสร้าง abstract class เพื่อให้คลาสอื่นสืบทอด โดยใน abstract class จะต้องมี abstract method อย่างน้อยหนึ่งตัว เพื่อให้คลาสลูกทำการ implement วิธีการทำงานของ abstract method ที่กำหนดในคลาสแม่
=== ดาวน์โหลดไฟล์ตัวอย่างได้ที่ https://goo.gl/RUcxtz
============
playlist สอนภาษาไพธอน Python เบื้องต้น
https://www.youtube.com/watch?v=DI7eca5Kzdc&list=PLoTScYm9O0GH4YQs9t4tf2RIYolHt_YwW
============
playlist สอนภาษาไพธอน Python การเขียนโปรแกรมเชิงวัตถุ (OOP: Object-Oriented Programming)
https://www.youtube.com/watch?v=4bVBSluxJNI&list=PLoTScYm9O0GF_wbU-7layLaSuHjzhIRc9
============
playlist สอนภาษา R เบื้องต้น
https://www.youtube.com/watch?v=oy4qViQLXsI&list=PLoTScYm9O0GF6qjrRuZFSHdnBXD2KVICp
============
playlist สอนภาษาจาวา Java เบื้องต้น
https://www.youtube.com/watch?v=O3rW9JvADfU&list=PLoTScYm9O0GF26yW0zVc2rzjkygafsILN
============
playlist สอนการเขียนโปรแกรมเชิงวัตถุด้วย Java เบื้องต้น
https://www.youtube.com/watch?v=zC_0xOSX1dY&list=PLoTScYm9O0GEvHKqqib-AdVFwVe_2ln8W
============
playlist สอนการทำ Unit Test ภาษาจาวา Java
https://www.youtube.com/watch?v=R11yg8hKApU&list=PLoTScYm9O0GHiK3KNdH_PrNB0G3-kb1Bi
============
playlist สอนภาษา C เบื้องต้น
https://www.youtube.com/watch?v=Z_u8Nh_Zlqc&list=PLoTScYm9O0GHHgz0S1tSyIl7vkG0y105z
============
playlist สอนภาษา C# เบื้องต้น
https://www.youtube.com/watch?v=hhl49jwOIZI&list=PLoTScYm9O0GE4trr-XPozJRwaY7V9hx8K
============
playlist สอนภาษา C++ เบื้องต้น
https://www.youtube.com/watch?v=_NHyJBIxc40&list=PLoTScYm9O0GEfZwqM2KyCBcPTVsc6cU_i
============
playlist สอนภาษา PHP เบื้องต้น
https://www.youtube.com/watch?v=zlRDiXjYVo4&list=PLoTScYm9O0GH_6LARFxozL_viEsXV2wgO
============
เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่
https://www.youtube.com/subscription_center?add_user=prasertcbs

python class method 在 工程師小宇宙 - Python 的Class methods 與Static methods 的相關結果
介紹Python 的class method 與static method ,他們都是用在class 類別中,但要特別注意兩者之間的使用方式與差別,class method 有能力存取類別的 ... ... <看更多>
python class method 在 Python進階技巧(2) — Static/Class/Abstract Methods之實現 的相關結果
「如何在Python 上實現Static/Class/Abstract methods?!」 難易度:(有學習過Object Oriented相關內容、對Python Class 概念熟悉者較易 ... ... <看更多>
python class method 在 [Python物件導向]解析Python物件導向設計的3種類型方法 ... 的相關結果
Python 類別(Class)中有@classmethod裝飾詞(Decorator)的方法(Method),被呼叫時,相較於實體方法(Instance Method)的self參數指向物件(Object),類別方法( ... ... <看更多>