پیشنهاد فرادرس

آموزش شی گرایی در پایتون

دسته بندی ها: برنامه نویسی شی گرا ، آموزش پایتون (Python) ، آموزش های TreeHouse

گاهی اسکریپت های ساده با توابع در آنها کافی نیست. در نهایت شما نیاز به مدل های منطقی کار خود دارید که به ایجاد کلاس های سفارشی در پایتون منجر می شود. برنامه نویسی شی گرا یک موضوع بزرگ است که ابزارهای شگفت انگیزی را ارائه می دهد، بنابراین یکی از مفید ترین چیزهایی است که در پایتون یاد می گیریم.

سرفصل:

  • برنامه نویسی شی گرا
  • وراثت
  • آبجکت های خاص methodsInstant
  • آبجکت و کلاس چیست؟
  • متدها
  • تعامل متد
  • آرگومان های متد
  • طراحی
  • مبانی OOP
  • روابط پیچیده
  • Family Tree
  • آبجکت های پیشرفته
  • مقایسه و ترکیب Dice
  • RPG Roller
  • و غیره
Object-Oriented Python Course Publisher:TeamTreeHouse Author:Kenneth Love Level:Beginner

Sometimes simple scripts with functions in them just aren't enough. Eventually you'll need logical models of your work and that'll lead you to creating custom classes in Python.
Object-oriented programming is a large topic. It provides us some amazing tools, though, so it's one of the most beneficial things to learn about in Python.
First, you'll learn how to build basic custom classes. Then, you'll expand them through inheritance. And for some extra power, you'll also learn how to take control of Python's built-in classes to make your own more powerful while doing less work. Finally, we'll put everything together into a fun game utility.
About this Course
Sometimes simple scripts with functions in them just aren't enough. Eventually you'll need logical models of your work and that'll lead you to creating custom classes in Python.
Object-oriented programming is a large topic. It provides us some amazing tools, though, so it's one of the most beneficial things to learn about in Python.
First, you'll learn how to build basic custom classes. Then, you'll expand them through inheritance. And for some extra power, you'll also learn how to take control of Python's built-in classes to make your own more powerful while doing less work. Finally, we'll put everything together into a fun game utility.
What you'll learn
Object-oriented programming
Inheritance
Special methodsInstant Objects
What are object/classes in Python and why use them? How do we create instances of classes?
12 steps
What Are Objects And Classes?
2:45
OOP Vocabulary Quiz 1
5 questions
Let's Make a Class!
4:21
Your first class
2 objectives
Methods
5:48
Your first method
1 objective
Method Interactivity
1 objective
Method Arguments
5:33
__init__
2 objectives
Design
3:40
OOP Basics
5 questions
Master Class
3 objectives
Inheritance
Classes are great but what if you need a bunch of stuff in common? Python lets us make classes that inherit from each other.
8 steps
Complex Relationships
3:37
Inheritance Quiz
5 questions
Super-Duper!
4:36
Super!
3 objectives
Multiple Superclasses
8:31
Super
2 questions
Family Tree
4:50
Instances
1 objective
Advanced Objects
No one wants to create every class from scratch. Let's see how to use Python's classes as the basis of our own.
14 steps
Controlling Conversion
6:24
Morse code printer
1 objective
Math
6:22
Multiplication
2 objectives
Emulating Built-ins
8:01
Iterable
1 objective
Subclassing Built-ins
10:28
Double
3 objectives
Frustration
1 objective
Constructicons
5:26
Construction Zone
1 objective
Special Methods
7:30
Proper Properties
2 objectives
Setters
1 objective
Dice Roller
Now that we have a good understanding of classes and object-oriented programming, let's use these skills to create a utility we can use when playing games.
11 steps
Project Breakdown
5:23
Boards
2 objectives
Comparing and Combining Dice
5:41
Compare and Contrast
1 objective
Giving a Hand
6:07
RPG Roller
2 objectives
Yatzy Scoring
7:42
Chance Scoring
2 objectives
Capitalism, the Game
3 objectives
Where to Now?
1:05
Review: Object-Oriented Python
10 questions
Extra Credit
You can take this project a lot farther! Here are some ideas:
Implement a Player class. Give the player a name, a scoresheet, and, on each turn, roll a Hand for them. Let them decide which category to score (only one score per category!). At the end, tell them their cumulative score.
Use your Player class to create a ComputerPlayer class. This player is controlled by the program and always scores the highest available score. Let your humans compete against the computer!
Keep track of how many times each die has been rolled in a given hand. Dice can be rerolled a maximum three times each before being scored. Give the players a way to reroll their dice.

پیشنهاد فرادرس

لینک های دانلود حجم فایل: 323.0MB TeamTreeHouse Object-Oriented Python Course_git.ir.rar
captcha