Found 34490 Articles for Programming

Python Program that Sends and Receives Message from Client

Niharika Aitam
Updated on 02-Aug-2023 11:36:17

100 Views

Python socket is a set of modules used for socket programming, which enables communication between processes over IP networks. Sockets in Python provide the backbone for most network programming tasks. By importing relevant modules, we can write Python programs to create client and server programs for different types of network applications such as web scraping, file transfer, email clients, and chat applications. The "socket" module is the most important module of socket programming in Python. It provides different types of connection-oriented and connection-less sockets that implement specific protocol levels such as TCP, UDP, etc. TCP (Transmission Control Protocol) sockets TCP ... Read More

Python program that renders a dictionary from two list with K values

Niharika Aitam
Updated on 02-Aug-2023 11:34:06

62 Views

A Dictionary is an unordered collection of data structure which stores the elements as key and value. It is mutable and in other programming languages Dictionaries are also known as associative arrays, hash maps, or hash tables. The key is the unique one and the values are of a single element or a list of elements with duplicates. A Dictionary can be created by using the curly braces {} or by using the built in function dict(). Let’s see an example of creating the dictionary in python. Example student = { 'name': 'Tutorialspoint', 'age': ... Read More

Progress Bars in Python

Niharika Aitam
Updated on 02-Aug-2023 11:33:09

2K+ Views

Progress bars in Python are visual indicators that provide feedback on the progress of a task or operation. They are useful for long-running processes or iterations where it's helpful to show how much work has been completed and how much is remaining. A progress bar typically consists of a visual representation, such as a horizontal bar or a textual representation, which dynamically updates to reflect the progress of the task. It also includes additional information like the percentage of completion, estimated time remaining, and any relevant messages or labels. The following are the purposes served by the progress bars in ... Read More

PHP Program to find the Closest Pair from Two Sorted Arrays

Pradeep Kumar
Updated on 02-Aug-2023 12:13:39

71 Views

What is PHP? PHP (Hypertext Preprocessor) is a popular scripting language designed for web development. It is widely used for creating dynamic and interactive web pages. PHP code can be embedded directly into HTML, allowing developers to mix PHP and HTML seamlessly. PHP can connect to databases, process form data, generate dynamic content, handle file uploads, interact with servers, and perform various server-side tasks. It supports a wide range of web development frameworks, such as Laravel, Symfony, and CodeIgniter, which provide additional tools and features for building web applications. PHP is an open-source language with a large community, extensive documentation, ... Read More

Programming Paradigms in Python

Niharika Aitam
Updated on 02-Aug-2023 11:32:03

2K+ Views

Programming paradigm is a specific approach or style of programming that provides a framework for designing and implementing computer programs. It encompasses a set of principles, concepts, and techniques that guide the development process and the structure of the code. Different paradigms have different ways of solving problems, organizing code, and expressing computations. The below are the various programming paradigms available in python which makes the developer work easy and more efficient. Procedural Programming Procedural programming focuses on dividing a program into a set of procedures or functions. In Python, we can define functions to perform specific tasks and structure ... Read More

Program to calculate Dooms Day for a year

Niharika Aitam
Updated on 02-Aug-2023 11:30:15

109 Views

The doomsday is also known as the doomsday of the week which is a specific day of the week that falls on the same date every year. The concept of the doomsday is based on the doomsday algorithm, which allows us to determine the day of the week for any given date. The doomsday algorithm was developed by mathematician John Horton Conway and is based on the idea that certain dates within each year fall on the same day of the week called the doomsday. The doomsday occurs on the following dates − January 3rd February 7th or 14th ... Read More

PHP program to Fetch Data from Localhost Server Database using XAMPP

Pradeep Kumar
Updated on 02-Aug-2023 11:32:36

799 Views

What is XAMPP? XAMPP is a software package that enables users to create a local web development environment on their computers. It includes the Apache web server, MySQL database, PHP scripting language, and Perl programming language. XAMPP simplifies the process of setting up a web server for testing and developing web applications, allowing users to work on their projects offline. It is widely used by developers to prototype and debug websites or web applications before deploying them to a live server. What is Database? A database is a structured collection of data organized and stored in ... Read More

Program to access different columns of a multidimensional Numpy array

Niharika Aitam
Updated on 02-Aug-2023 11:28:57

78 Views

Numpy is the most powerful library in python for computing numerical data. It provides multidimensional arrays, along with different collections of functions and modules to work with arrays. Its efficient array operations, broadcasting capabilities, and integration with other libraries make it a go-to choice for data manipulation, analysis, and modeling tasks. The following are the key features and functionalities of the Numpy library. Multidimensional arrays Array creation Array operations Indexing and Slicing Vectorized operations Numerical Routines Integration with other libraries Performance Open source and community support Creation of an array In Numpy library we have the functions called ... Read More

PHP Program to Count Trailing Zeroes in Factorial of a Number

Pradeep Kumar
Updated on 02-Aug-2023 10:31:14

149 Views

What is Factorial of a Number? The factorial of a non-negative integer, denoted by the symbol "!", is the product of all positive integers less than or equal to that number. In other words, the factorial of a number is obtained by multiplying that number by all the positive integers below it. For example, the factorial of 5 is calculated as: 5! = 5 x 4 x 3 x 2 x 1 = 120 Similarly, the factorial of 0 is defined to be 1: 0! = 1 Factorials are often used in mathematics and combinatorics to ... Read More

PHP Program to Count set Bits in an Integer

Pradeep Kumar
Updated on 02-Aug-2023 10:26:07

161 Views

What is Binary code? Binary code is a system of representing information or data using a base-2 numeral system. It uses only two digits, typically 0 and 1, to represent all values. Each digit in a binary code is called a bit (short for binary digit). In binary code, each digit represents a power of 2. Starting from the rightmost digit, the powers of 2 increase from right to left. For example, in an 8-bit binary code, the rightmost bit represents 2^0 (1), the next bit represents 2^1 (2), the next represents 2^2 (4), and so on. Example ... Read More

Advertisements