Random module- Function in this module depends upon the pseudo random number generator function random. random()- Generates a random float number 0.0 to 1.0. syntax:- randint()- Returns a random integer between the specified integers. syntax:- randrange()- Returns a randomly selected …
File handling is an important part of any web application. In file handling, the most important part is the path of a file. We have a function by which we can get path of any file. Here we’ll see that. …
File handling is an important part of any web application. In file handling, the most important part is the path of a file. We have a function by which we can get the path of any file. Here we’ll see …
Importing a file while writing a program is one of the important tasks. As we have many types of files like CSV file, text file, python file, etc. So we have to do different things to import different files. We …
We can get the current date by importing a library known as datatime. e.g., This is how we can get current date using python code.
We have an inbuilt function type() by which we can check the type of variable. e.g., e.g., This is how we can check the type of variable in python.
String is a datatype which is written in single, double or triple inverted commas. For finding the length of string we have a function len(). We’ll see some examples here. e.g., In this way we can find the length of …
We have many methods to find the remainder in python. We’ll see some examples here. e.g., using % symbol e.g., using divmod() This is all about finding remainder in python.
Finding the prime factors of a number is a basic program in python which can be done in many ways. We’ll see here how to find prime factors in python using loops. e.g., This is how we can find prime …
Statistics and data science are often concerned about the relationships between two or more variables (or features) of a dataset. A correlation could be positive, meaning both variables move in the same direction, or negative, meaning that when one variable’s …