How to Multiply List Elements by a Number – Top 5 Ways

Problem Formulation and Solution Overview In this article, you’ll learn how to multiply List Elements by a Number in Python. This example multiples the first five (5) Prime Numbers by two (2) and return the result. πŸ’¬ Question: How would we write Python code to multiply the list elements? We can accomplish this task by … Read more

How to Retrieve the Line Count of a File in Python

Problem Formulation and Solution Overview In this article, you’ll learn how to quickly retrieve the line count of a file in Python. To follow along, save the contents below to a flat-text file called mona_lisa.txt and move this file to the current working directory. The Mona Lisa: A painting by Leonardo da VinciLeonardo da Vinci … Read more

How to Create High Precision Data Types

Problem Formulation and Solution Overview In this article, you’ll learn how to create high-precision data types in Python. πŸ’‘ Definition: High-precision data types are numeric data types, such as integers, or floats, that use additional memory when complex mathematical calculations require extreme accuracy. πŸ’¬ Question: How would we write Python code to create high-precision data … Read more

6 Easy Ways to Extract Elements From Python Lists

Problem Formulation and Solution Overview In this article, you’ll learn how to extract data from List elements in Python. To make it more fun, we have the following running scenario: The Finxter Academy has been keeping tabs on an up-and-coming stock, MediTech. Each Sunday, the prices for the previous week are updated and saved to … Read more

How to Initialize a NumPy Array? 6 Easy Ways

Problem Formulation and Solution Overview In this article, you’ll learn how to initialize a NumPy array in Python using six (6) of the most commonly used methods. Background: NumPy is Python’s impressive array-based data structure library used to perform intense mathematical calculations popularized by the Machine Learning and Data Science community. Let’s start by creating … Read more

How to Extend a Dictionary in Python

Problem Formulation and Solution Overview In this article, you’ll learn how to extend a Dictionary in Python. To make it more fun, we have the following running scenario: Weddings-911, an Event Planner start-up, has just booked three (3) new clients and is hoping for many more! This data is saved to the Dictionary weddings. Beth, … Read more

Install Python Application Component in EasyPHP

This article focuses on installing the Python application component in EasyPHP. This article also assumes you have an IDE installed and have completed the following articles: Setup EasyPHP DevServer on My Local Windows PC Setup the EasyPHP Dashboard CSV to MySQL Table [EasyPHP + PHPMyAdmin] and the following steps: Started EasyPHP Opened the Dashboard Started … Read more

Display a Web Page using EasyPHP, Python and PHP

This article focuses on configuring Python to work with MySQL. This article also assumes you have an IDE installed and have completed the following articles: Setup EasyPHP DevServer on My Local Windows PC Setup the EasyPHP Dashboard CSV to MySQL Table [EasyPHP + PHPMyAdmin] and the following steps: Started EasyPHP Opened the Dashboard Started the … Read more