Posts

Showing posts with the label Data types

Data types in Python:

Image
​ Data types:  It defines what type of data a  variable is carrying. There are 4 main data  types that are frequently used is Python programming are;  int, float, str, and bool. Any whole number with no  decimal places is referred to as Integer, like 1 or 20. X = 10 print(x) print(type (x)) 10 <class’int'> The floats are the number with decimal places like 3.14 or 5.22  X=2.5 print(x) print(type (x)) 2.5 ‹class’float’> Any kind of non-numerical data, like letters or words, are strings. Strings can be built using single ‘ ‘ or double quotes "" X = 'English' print(x) print(type (x)) English <class‘str'> True and False are the example of Boolean  values, and can be referred to as "Yes"and "No". Boolean values is used to do filtering operations on data. X = True print(x) print(type (x)) True ‹class’bool'>

Code Comments in Python

Image
Using comments is really important to make sure that you yourself and other can understand your coding. To add comments to the scripts of your Python program you need to use # Sign. Python does not run what is written after # sign and ignores it. e.g: # Add 4 and 5 equal 9 print(4+5) 9 

Importance of Python Language in Artificial Intelligence, Machine Learning and Data Science.

Image
  Python and Artificial Intelligence Python is an interpreted, high-level interpreted programming language, intended specifically for rapid prototyping and integration with other languages. The most popular use of python is as an object-oriented programming language (OOP) language. It is the fundamental language of the data science community, where many open source projects develop their libraries, which help to solve complex real world problems, using large datasets and can be used in a very efficient manner. It has also a huge community around it, so that any user, or developer, can easily get the latest information about the current development within less than seconds of asking the question. Its syntax supports for both traditional expressions like expression, as well as new ones like functional programming, decorator, method, etc., which are more often than not used for computation in artificial intelligence systems. In simple terms, it creates objects, performs operations on ...