Python tutorials

Minimax in Python: Learn How to Lose the Game of Nim

You’ve gotten to know the steps of the minimax algorithm. In this section, you’ll implement minimax in Python. You’ll start by tailoring the algorithm directly to the game of Simple-Nim. Later, you’ll refactor your code to separate the core of the algorithm from the rules of the game, such that you can later apply your minimax code to other games. Implement a Nim-Specific Minimax Algorithm Consider the same example as in the previous section: it’s Maximillian’s turn, and there are […]

Read more

FAST TEXT ALGORITHM

FastText is a lightweight, open-source framework that enables users to learn text representations and classifiers. It runs on common, generic hardware. This model may be used to create an unsupervised or supervised learning technique for obtaining word vector representations. This module has acquired a lot of interest in the NLP community and might be a viable alternative to the genism package, which includes Word Vectors and other features. FastText differs in that word vectors, also known as word2vec, take   […]

Read more

Python Basics: Conditional Logic and Control Flow

Much of the Python code you’ll write is unconditional. That is, the code does not make any choices. Every line of code is executed in the order that it’s written or in the order that functions are called, with possible repetitions inside loops. In this course, you’ll learn how to use conditional logic to write programs that perform different actions based on different conditions. Paired with functions and loops, conditional logic allows you to write complex programs that can handle […]

Read more

Python Basics: Strings and String Methods

Many programmers, regardless of their specialty, deal with text on a daily basis. For example, web developers work with text input from web forms. Data scientists process text to extract data and perform tasks like sentiment analysis, which can help identify and classify opinions in a body of text. Collections of text in Python are called strings. Special functions called string methods are used to manipulate strings. There are string methods for changing a string from lowercase to uppercase, removing […]

Read more
1 76 77 78 79 80 185