Posts

Showing posts with the label functions in python

Numpy - The Python Library for Data Science

Image
 Numpy - The Python Library for Data Science Python comes with various libraries and modules, including the math module, which has its own function library, as well as the random module, which allows you to generate pseudo-random numbers and manipulate them to simulate different forms of randomness and probability. In addition to these modules, there’s another in Python known as numpy (pronounced nump-eye). The name numpy stands for Numerical Python, and it can be used in many ways to solve numerical problems within the Python programming language. Introduction Numpy is a powerful Python library that is widely used in data science. It provides an efficient way to store and manipulate data, and has a wide range of mathematical functions that can be applied to data. Numpy is fast, reliable, and easy to use, making it a popular choice for data scientists. Installation Numpy can be installed using pip, which is the standard package manager for Python. Once you have pip installed, you c...

Variables in Python Language.

Image
​ Variables: To store a value for future use, you can define a variable with a case-sensitive, specific name that should be used to refer to that value. For defining a variable, use the = sign. fill_in = 800 print (fill_in) 800 Giving a value to a variable is called declaration . You have to declare a variable before using its value. When a variable has been declared, it can be used in your coding. Another example: name = "John" print(name) John

The Type Function in Python

Image
  The Type Function:                                   Data types explain what kind of data a variable can hold. The type ( ) function can assist you figure out a variable data type. x = 53 print(type(x)) Answer is:         <class 'int'> Same goes for Strings, floats and Boolean values.