- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Pradeep Elance has Published 446 Articles
Pradeep Elance
895 Views
Exec function can dynamically execute code of python programs. The code can be passed in as string or object code to this function. The object code is executed as is while the string is first parsed and checked for any syntax error. If no syntax error, then the parsed string ... Read More
Pradeep Elance
551 Views
The measurements of angles in mathematics are done using these two units of measurement called degree and radian. They are frequently used in math calculations involving angles and need conversion from one value to another. In python we can achieve these conversions using python functions.degrees() FunctionThis function takes radian value ... Read More
Pradeep Elance
2K+ Views
In this article we develop a program to calculate the frequency of each element present in a list.Using a dictionaryHere we capture the items as the keys of a dictionary and their frequencies as the values.Example Live Demolist = ['a', 'b', 'a', 'c', 'd', 'c', 'c'] frequency = {} for item ... Read More
Pradeep Elance
622 Views
This function return the string representing a character whose Unicode code point is the integer supplied as parameter to this function. For example, chr(65) returns the string 'A', while chr(126) returns the string '~'.SyntaxThe syntax of the function is as below.chr(n) where n is an integer valueExampleThe below program shows ... Read More
Pradeep Elance
2K+ Views
Many times we may need to convert the data types of one or more columns in a pandas data frame to accommodate certain needs of calculations. There are some in-built functions or methods available in pandas which can achieve this.Using astype()The astype() method we can impose a new data type ... Read More
Pradeep Elance
333 Views
There are a variety of mathematical series which python can handle gracefully. One such series is a series of repeated digits. Here we take a digit and add it to the next number which has two such digits and again the next number is three such digits and so on. ... Read More
Pradeep Elance
210 Views
Create a Python ListExampleC:\Py3Project>howdoi create a python listOutputRunning the above code gives us the following result −>>> l = [None] * 10 >>> l [None, None, None, None, None, None, None, None, None, None]Printing Today’s DateExamplec:\python3>howdoi print today's date in pythonOutputRunning the above code gives us the following result −for ... Read More
Pradeep Elance
912 Views
In python the print statement adds a new line character by default. So when we have multiple print statements the output from each of them is printed in multiple lines as you can see in the example below. Our goal is to print them in a single line and use ... Read More
Pradeep Elance
2K+ Views
Greatest common divisor or gcd is a mathematical expression to find the highest number which can divide both the numbers whose gcd has to be found with the resulting remainder as zero. It has many mathematical applications. Python has a inbuilt gcd function in the math module which can be ... Read More
Pradeep Elance
2K+ Views
These two methods are part of python math module which helps in getting the nearest integer values of a fractional number.floor()It accepts a number with decimal as parameter and returns the integer which is smaller than the number itself.SyntaxSyntax: floor(x) Where x is a numeric valueExample of floor()In the below ... Read More