Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Programming Articles - Page 425 of 3363
525 Views
In golang, Promoted methods are the methods created under those structs which are embedded inside another struct, now the struct in which it is embedded can access its methods and fields. In this article we are going to explain how to show promoted methods using various structs like Rectangle and Square, Vehicle and car. Algorithm Step 1 − Create a package main and declare fmt(format package) package in the program where main produces executable codes and fmt helps in formatting input and Output. Step 2 − Create a Rectangle struct with two fields width and height of type float ... Read More
482 Views
In golang, promoted fields are the structs that are embedded inside another structs and their fields can also be accessed the structs in which they are embedded. In this article we are going to understand three different approaches to depict use of promoted filed with and without the help of pointers. Using Pointers In this illustration, we will make use of pointers to show the promoted fields. The field names will be set with the help of pointers and information will be printed using dot notation. Algorithm Step 1 − Create a package main and declare fmt(format package) package ... Read More
421 Views
In golang, a rand package is used to generate random numbers/characters. Firstly, it seeds with the current time to get the different random Output each time then perform any operation. Syntax rand.Seed(value) Rand.Seed() function is used to generate random numbers. It takes a user input as argument which is the upper limit for generating random numbers. func Now() Time The Now() function is defined in time package. This function generates the current local time. To use this function, we have to first impot the time package in our program. func (t Time) UnixNano() int64 The UnixNano() function ... Read More
305 Views
In this article, we will write Go language programs to show scope of global and local variables using pointer approach. Scope is referred to as the accessibility of the piece of code in the program in particular function. Scope can be defined in two ways: globally and locally. Global means a variable declared in the main cannot be overwritten by any modification and remains same everywhere whereas local access means when variable is modified inside the function, it can only be used inside the function and its scope remains in that function only. Using Same Global and Local Variables In ... Read More
1K+ Views
In this Golang article, we will write programs to print struct variables. Here, there is no concept of classes, instead of that structs are used to represent a collection of related fields or properties. Using Name of the Field and Shorthand Declaration in the Main Function In this method, we will create a child struct and further create two fields name and age in it. The field values are set by creating the instance of the struct. In the second example, the field values of the Child struct are set in the instance using shorthand declaration and the field ... Read More
2K+ Views
Low-level programming languages like C or C++ frequently use pointers to directly handle memory. They enable effective memory management and low-level data manipulation. The low-level complexities of memory administration are abstracted away in Python, a high-level language. Because of this, Python lacks express pointers in an equal manner that C or C++. As an alternative, Python makes use of an idea comparable to this one known as references, which enables indirect access to objects in memory by variables. Python gives builders a sturdy toolkit without requiring them to have a thorough appreciation of low-level memory administration through the use of ... Read More
370 Views
The most popular and widely used programming language across the community is none other than Python. Efficiency, flexibility, and simplicity, all come with Python. It is widely used in more than a few industries, from net enhancement to scientific computing, pc learning, and records analysis. Python has a great library of modules and tools, making it a perfect preference for developing complicated projects. Here, we will go through various major projects developed in Python. YouTube YouTube is one of the most well-known video-sharing platforms in the world, and its backend infrastructure is constructed on Python. The internet framework of YouTube ... Read More
1K+ Views
Python has hooked up itself as one of the most widely used programming languages in the world after being around for more than three decades. Python has obtained focus in many industries thanks to its simple syntax, adaptability, and countless libraries, alongside web development, data research, and artificial intelligence, to point out a few. Yet, some analysts have started to wonder whether Python will remain applicable given the recent rise of new programming languages. We shall examine if Python is nearing extinction or is still thriving in this article. We'll look at how it stands right now, investigate the causes ... Read More
438 Views
Automation has become an integral element of our lives in the modern day. We can increase productivity and save time by automating routine chores. For instance, Python can be used to automate the download of TV programs if you enjoy watching them. This tutorial will walk you through the procedures needed to use Python to automate the download of TV programs. Choose the Television Programs you want to Download Choosing the TV programs you wish to download is the first step in automating the download process. To find out more about the TV shows that interest you, use online TV ... Read More
293 Views
In today’s world, everyone is upgrading their skill by learning to program. As the market is challenging and competitive as well, knowing how to code gives you an upper edge in your workplace. However, selecting the best language is also a challenge to start with. Fortunately, Python has got your back. But can Python serve as a suitable introduction to programming? This article will go into that very issue and examine the factors that contribute to Python's appeal to novice programmers. Let’s have a look at the following factors before opting for a programming language such as Python − ... Read More