Archives: Tutorials

python operating system functions

System Functions in Python

The OS module in Python provides access to some functions of the operating system. It is implemented in Python by default and does not have to be installed subsequently, for example by pip.It is great for working with directories and files.

cpp operating system functions

System Functions in C++

The system() function has been part of the C standard library for some time and can also be included in code without additional libraries. The function is used to execute shell commands from calling processes.

java operating system functions

System Functions in Java

System class The System class contains several useful class fields and methods. It cannot be instantiated. Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined properties and environment variables; a means of loading files and libraries; and a utility method for quickly copying a portion of an …

System Functions in Java Read More »

python threads threading

Threads in Python

A thread is often also referred to as a lightweight process. In general, a thread in computer science refers to an execution thread or an execution sequence in the execution of a program. By default, each process has at least one thread, in a sense the process itself. A process can start several threads. The …

Threads in Python Read More »

python mathematical functions

Mathematical Functions / Sequences in Python

Mathematical standard libraries now include a large collection of mathematical functions, such as mathematical rounding, mathematical calculations, exponential, logarithmic, and tigonometric functions, and much more. Mathematical Sequences are listings of numbered objects. Expressed in more detail a mathematical sequence describes a mapping of the natural numbers onto a (sub) set of the real numbers. In …

Mathematical Functions / Sequences in Python Read More »

python sorting algorithms

Sorting Algorithms in Python

There are very many sorting algorithms that work with varying degrees of efficiency. Some sorting methods require additional storage space besides that needed to store the array. The complexity and memory requirements of some sorting algorithms depend on the initial arrangement of the values in the array, and a distinction is then made between best …

Sorting Algorithms in Python Read More »

python data structures

Data Structures in Python

A data structure is the storage of data, using a mathematical object. The data is arranged and linked in a specific way. Through the special structure of a data structure, one tries to implement desired functions particularly efficiently, whereby one usually optimises either for low memory requirements or high speed. The data is divided into …

Data Structures in Python Read More »

python file operations

Fileoperations in Python

A basic topic in programming is the processing of files. If information is to be stored until the next program start, this data is written to the hard disk in files. Thus the information remains also after the termination of the program. After opening a file, it remains locked for further accesses from outside. At …

Fileoperations in Python Read More »

python inheritance and polymorphism

Inheritance and Polymorphism in Python

Inheritance Inheritance is one of the most important concepts of object-oriented programming. It makes it possible to divide complex problem areas into meaningful class hierarchies. Properties and capabilities that several classes possess are implemented only once in a superclass and inherited by one or more subclasses. Thus, not only is code reused, but the logic …

Inheritance and Polymorphism in Python Read More »

python classes and objects

Classes and Objects in Python

Object-oriented vs. procedural programming Before we go into more detail about object orientation, let’s first look at the difference between procedural programming and object-oriented programming? Procedural programming Procedurally oriented programming uses the “top-down” programming style. Problem is formulated as sequential string of subtasks to be done. Thus a free and thus unprotected data flow and …

Classes and Objects in Python Read More »

python lists

Lists in Python

Lists are one of the central object types in Python and are often used to store complex information due to their flexibility and performance. A list is a concatenation of data or object types and is also sometimes called a container. A list can be both homogeneous and heterogeneous in nature. A list is homogeneous …

Lists in Python Read More »

python functions

Functions in Python

Depending on the programming language, different names are used for functions. In some programming languages a distinction is made between functions that return a value as the result of a calculation and routines that only execute code. The latter are also known as procedures. However, functions are used in the python programming language. A function …

Functions in Python Read More »

python control structures

Control Structures in Python

Control structures are required for sequence control in programs and are an important part of structured and imperative programming. The flow control is based on loops and branches, which are mostly linked with logical expressions of boolean algebra. This means that instructions in a program are only partially executed.

python programming basics

Python Programming Basics

Python Programming Language Python is a programming language that is easy to learn and very versatile thanks to its clear syntax and simple readability. Python is freely available for the common operating systems. The usual programming paradigms such as object-oriented or functional programming are supported. Python is already around 30 years old, but for some …

Python Programming Basics Read More »

cpp data structures (heap, stack, list, queue)

Data Structures in C++

A data structure is the storage of data, using a mathematical object. The data is arranged and linked in a specific way. Through the special structure of a data structure, one tries to implement desired functions particularly efficiently, whereby one usually optimises either for low memory requirements or high speed. The data is divided into …

Data Structures in C++ Read More »

cpp fileoperations (ofstream, ifstream, fstream)

Fileoperations in C++

A basic topic in programming is the processing of files. If information is to be stored until the next program start, this data is written to the hard disk in files. Thus the information remains also after the termination of the program. After opening a file, it remains locked for further accesses from outside. At …

Fileoperations in C++ Read More »

cpp pointer

Pointer in C++

First of all: The direct use of pointers can be dangerous and occasionally lead to errors even for experienced programmers. This is why you should be very careful when using pointers. Pointers are necessary to use dynamically allocated memory. In other words a pointer is a variable whose content contains the position of another variable …

Pointer in C++ Read More »

c++ templates

Templates in C++

With the template C++ offers a tool to describe an algorithm in general without committing to a data type. Templates are used when the same actions are to be applied to different data types. This form of algorithm description independent of the type is called “generic programming”.

java threads

Threads in Java

Java is a programming language that supports multithreading. This means that a process (application) can be divided into different parts. These subtasks can be processed “in parallel” by different threads. In terms of content, individual threads are a sequential sequence of instructions. Viewed as a whole, however, they run “parallel” to other threads.