Tag: Programming

Java: Converting String to List

There are many other reasons for wanting to convert a String to a List. For example, the length of the String needs to be defined. Such a restriction does not…

Python code for Trigonometry Calculator

Trigonometry is an important branch of mathematics that deals with the study of relationships between the sides and angles of triangles. It finds applications in various fields, such as physics,…

Solving Quadratic Equations with Python

Quadratic equations are a type of polynomial equation that have been studied for centuries. They have applications in various fields such as physics, engineering, and economics. A quadratic equation is…

Misunderstanding isset() behavior in PHP

The isset() function in PHP is often misunderstood, leading to errors and unintended outcomes in code. In this article, we will delve deeper into the workings of isset() and show…

Object-Oriented Python

Python is a fully object-oriented programming language but it can also be used for scripting. It is assumed that you are already familiar with object-orientation concepts and have experience writing…

Python Error Handling

In Python, you can handle errors with exceptions. The following code will generate an FileNotFound error because the file it is trying to open does not exist: output An error…

Python Regular Expressions

Python uses re library for regular expressions. re comes with standard python installation. Regular expressions is a very big topic. This page only covers the basics of how to search…

Python Unit Testing Example

Unit testing functionality is built into Python3. Following is a very simple example: Save this file as mycode.py. Save the following code as mycode_unittest.py When you run the unit test…