Friday, March 24, 2023
Learning Code
  • Home
  • JavaScript
  • Java
  • Python
  • Swift
  • C++
  • C#
No Result
View All Result
  • Home
  • JavaScript
  • Java
  • Python
  • Swift
  • C++
  • C#
No Result
View All Result
Learning Code
No Result
View All Result
Home Python

Creating Tic-Tac-Toe With an AI Player & Shortcuts for Python Decorators – The Real Python Podcast

learningcode_x1mckf by learningcode_x1mckf
November 11, 2022
in Python
0
Creating Tic-Tac-Toe With an AI Player & Shortcuts for Python Decorators – The Real Python Podcast
74
SHARES
1.2k
VIEWS
Share on FacebookShare on Twitter


Real Python Podcast Episode #132 Title Artwork

Nov 11, 2022 54m

Christopher Bailey
Christopher Trudeau

How do you create a pc opponent for a easy sport inside Python? Would you additionally wish to discover ways to adapt the sport to run in an online browser or graphical consumer interface (GUI)? This week on the present, Christopher Trudeau is right here, bringing one other batch of PyCoder’s Weekly articles and initiatives.

Episode Sponsor:


Christopher shares a latest Actual Python step-by-step challenge for making a tic-tac-toe sport engine. He talks about how one can construct the sport engine and adapt it for various entrance ends. The tutorial additionally reveals how one can implement an unbeatable pc participant utilizing the minimax algorithm.

We talk about an article about how one can keep away from repeating your self when creating decorators with a number of parameters. We discuss how one can cease copying and pasting code a number of occasions by assigning the decorator to a brand new variable.

We share a number of different articles and initiatives from the Python group, together with a information roundup, a deep dive into Python’s doctest, a number of Python command line tips, sort annotations by way of automated refactoring, a brand new manner to attract containers within the terminal, a group of initiatives for freshmen with supply code, a minimalist PDF creation library, and a device for smart logging in Python.

Course Highlight: Python Decorators 101

On this course on Python decorators, you’ll study what they’re and how one can create and use them. Decorators present a easy syntax for calling higher-order features in Python. By definition, a decorator is a perform that takes one other perform and extends the conduct of the latter perform with out explicitly modifying it.

Subjects:

  • 00:00:00 – Introduction
  • 00:02:25 – Python 3.12.0 Alpha 1 Launched
  • 00:02:45 – PyCon US 2023 Name for Proposals
  • 00:03:27 – Python’s doctest: Doc and Take a look at Your Code at As soon as
  • 00:13:59 – Construct a Tic-Tac-Toe Sport Engine With an AI Participant in Python
  • 00:22:12 – Sponsor: InfluxDB
  • 00:22:59 – Python Command Line Tips
  • 00:30:50 – Sort Annotation by way of Automated Refactoring
  • 00:34:29 – A New (?) Method of Drawing Packing containers within the Terminal
  • 00:37:10 – Decorator Shortcuts
  • 00:39:36 – Video Course Highlight
  • 00:41:02 – 190 Python Tasks With Supply Code
  • 00:47:58 – fpdf2: Minimalist PDF Creation Library
  • 00:50:04 – Easy, Sane, and Wise Logging in Python
  • 00:53:05 – Thanks and goodbye

Information:

Subjects:

  • Python’s doctest: Document and Test Your Code at Once – On this tutorial, you’ll discover ways to add utilization examples to your code’s documentation and docstrings and how one can use these examples to check your code. To run your utilization examples as automated assessments, you’ll use Python’s doctest module from the usual library.
  • Build a Tic-Tac-Toe Game Engine With an AI Player in Python – On this step-by-step tutorial, you’ll construct a common sport engine in Python with tic-tac-toe guidelines and two pc gamers, together with an unbeatable AI participant utilizing the minimax algorithm. You’ll additionally create a text-based graphical entrance finish to your library and discover two different entrance ends.
  • Python Command Line Tricks – Utilizing python -m you are able to do all types of issues from the command line, together with beginning a webserver, opening a browser, parsing JSON, compressing recordsdata, and way more.
  • Type Annotation via Automated Refactoring – Jimmy’s workforce at Carta determined they wished so as to add sort annotations to their massive codebase, however doing so manually would’ve taken a really very long time. This put up reveals you ways they constructed automated refactoring instruments so as to add sort annotations to their code.
  • A New (?) Way of Drawing Boxes in the Terminal – With intelligent use of among the Unicode border characters, you possibly can construct a greater field round your textual content, with none coloration bleeding.
  • Decorator Shortcuts – “When utilizing many decorators in code, there’s a shortcut you should utilize if you end up repeating them. They are often assigned to a variable identical to another Python expression.”

Dialogue:

Tasks:

Extra Hyperlinks:


Tweet
Share
Share
Email
class=”h4″>

Degree Up Your Python Abilities With These Programs:

« Browse All Episodes





Source link

You might also like

When Should You Use .__repr__() vs .__str__() in Python? – Real Python

Summing Values the Pythonic Way With sum() – Real Python

Executing Python Scripts With a Shebang – Real Python

Share30Tweet19
learningcode_x1mckf

learningcode_x1mckf

Recommended For You

When Should You Use .__repr__() vs .__str__() in Python? – Real Python

by learningcode_x1mckf
March 22, 2023
0
When Should You Use .__repr__() vs .__str__() in Python? – Real Python

One of the vital frequent duties that a pc program performs is to show information. This system typically shows this info to this system’s person. Nonetheless, a program...

Read more

Summing Values the Pythonic Way With sum() – Real Python

by learningcode_x1mckf
March 21, 2023
0
Summing Values the Pythonic Way With sum() – Real Python

Python’s built-in perform sum() is an environment friendly and Pythonic strategy to sum an inventory of numeric values. Including a number of numbers collectively is a typical intermediate...

Read more

Executing Python Scripts With a Shebang – Real Python

by learningcode_x1mckf
March 20, 2023
0
Executing Python Scripts With a Shebang – Real Python

While you learn another person’s Python code, you continuously see a mysterious line, which all the time seems on the high of the file, beginning with the distinctive...

Read more

Coding With namedtuple & Python’s Dynamic Superpowers – The Real Python Podcast

by learningcode_x1mckf
March 17, 2023
0
Coding With namedtuple & Python’s Dynamic Superpowers – The Real Python Podcast

Mar 17, 2023 53m Have you ever explored Python’s collections module? Inside it, you’ll discover a highly effective manufacturing facility operate known as namedtuple(), which gives a number...

Read more

How to Evaluate the Quality of Python Packages – Real Python

by learningcode_x1mckf
March 15, 2023
0
How to Evaluate the Quality of Python Packages – Real Python

Putting in packages with Python is only one pip set up command away. That’s one of many many nice qualities that the Python ecosystem has to supply. Nonetheless,...

Read more
Next Post
Junior Java Developer at Reverside

Junior Java Developer at Reverside

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related News

Time limit for notify – JavaScript – SitePoint Forums

Investment formula. How to fix to calculate correctly? – JavaScript – SitePoint Forums

November 5, 2022
The Noonification: An Intro to Algorithms and Data Structures (Javascript Edition) (9/15/2022)

The Noonification: An Intro to Algorithms and Data Structures (Javascript Edition) (9/15/2022)

September 15, 2022
All about the Swift Package Manager and the Swift toolchain

All about the Swift Package Manager and the Swift toolchain

October 2, 2022

Browse by Category

  • C#
  • C++
  • Java
  • JavaScript
  • Python
  • Swift

RECENT POSTS

  • Java Developer Survey Reveals Increased Need for Java … – PR Newswire
  • What You Should Definitely Pay Attention to When Hiring Java Developers – Modern Diplomacy
  • Java Web Frameworks Software Market Research Report 2023 … – Los Alamos Monitor

CATEGORIES

  • C#
  • C++
  • Java
  • JavaScript
  • Python
  • Swift

© 2022 Copyright Learning Code

No Result
View All Result
  • Home
  • JavaScript
  • Java
  • Python
  • Swift
  • C++
  • C#

© 2022 Copyright Learning Code

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?