<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Davisonyeas</title>
    <description>The latest articles on DEV Community by Davisonyeas (@davisonye).</description>
    <link>https://dev.to/davisonye</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F838802%2F68a26796-f9da-42f2-8154-c341fb32bd5c.jpg</url>
      <title>DEV Community: Davisonyeas</title>
      <link>https://dev.to/davisonye</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davisonye"/>
    <language>en</language>
    <item>
      <title>Getting Started With Python PyStart(Data Types)</title>
      <dc:creator>Davisonyeas</dc:creator>
      <pubDate>Sun, 03 Apr 2022 03:38:20 +0000</pubDate>
      <link>https://dev.to/davisonye/getting-started-with-python-pystartdata-types-3a9h</link>
      <guid>https://dev.to/davisonye/getting-started-with-python-pystartdata-types-3a9h</guid>
      <description>&lt;p&gt;&lt;strong&gt;1.0 DATA TYPES&lt;/strong&gt;&lt;br&gt;
In programming, data type is an important concept. Just as we discussed previously on variables, Variables can store different types. &lt;br&gt;
Python has many built-in data types, such as &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Text type : str&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Numeric type : int, float, complex&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Boolean type : True or False&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sequence type : List, Tuple, Range&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z5TKeEpB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlghrwakp5845r973mj6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z5TKeEpB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlghrwakp5845r973mj6.jpg" alt="Image description" width="771" height="401"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x = "Davis"
# x is a string data type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;y = 4; 
# y is an int data type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;z = 7.5;
# z is a float type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To display the result of this, We make use of the print() built-in function;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(x)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(y)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(z)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;Davis&lt;/code&gt;&lt;br&gt;
&lt;code&gt;4&lt;/code&gt;&lt;br&gt;
&lt;code&gt;7.5&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
We defined a var x = "Davis"; just as we have in other programming languages like Java, Python automatically detects the data type of the value)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Also,&lt;/strong&gt; when declaring variable names, we take note of keywords, there are some reserved keywords in python that shouldn't be used as a variable name, some of such keywords includes &lt;strong&gt;return&lt;/strong&gt;, &lt;strong&gt;is&lt;/strong&gt;, &lt;strong&gt;continue&lt;/strong&gt;, &lt;strong&gt;def&lt;/strong&gt;, &lt;strong&gt;finally&lt;/strong&gt;, and a few other words. Read further on Python keywords  &lt;a href="https://docs.python.org/2.5/ref/keywords.html"&gt;Click here for Python keywords&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.1 Checking the data type of the variable&lt;/strong&gt;&lt;br&gt;
It is important that we know how to check data types in Python, this is a basic concept that will come in handy when we get to more advanced topics like Data Preprocessing and Analysis. &lt;br&gt;
We check the type of our data by using the type() method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(type(x))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(type(y))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;int&lt;/code&gt;&lt;br&gt;
&lt;code&gt;str&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Getting Started With Python PyStart(Variables)</title>
      <dc:creator>Davisonyeas</dc:creator>
      <pubDate>Thu, 31 Mar 2022 23:49:58 +0000</pubDate>
      <link>https://dev.to/davisonye/getting-started-with-python-pystartvariables-3a3c</link>
      <guid>https://dev.to/davisonye/getting-started-with-python-pystartvariables-3a3c</guid>
      <description>&lt;p&gt;&lt;strong&gt;1.0 VARIABLES&lt;/strong&gt;&lt;br&gt;
Variables are containers for storing data values. Python has no command for declaring variable. A variable is created the moment you assign a value to it.&lt;br&gt;
For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x = 4;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;y = "Davis"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To display the result of this, We make use of the print() built-in function;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(x)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(y)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;4&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Davis&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
In Python, we do not have to say x = int 4; just as we have in other programming languages like Java, Python automatically detects the data type of the value)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Also,&lt;/strong&gt; when declaring variable names, we take note of keywords, there are some reserved keywords in python that shouldn't be used as a variable name, some of such keywords includes &lt;strong&gt;return&lt;/strong&gt;, &lt;strong&gt;is&lt;/strong&gt;, &lt;strong&gt;continue&lt;/strong&gt;, &lt;strong&gt;def&lt;/strong&gt;, &lt;strong&gt;finally&lt;/strong&gt;, and a few other words. Read further on Python keywords  &lt;a href="https://docs.python.org/2.5/ref/keywords.html"&gt;Click here for Python keywords&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.1 Checking the data type of the variable&lt;/strong&gt;&lt;br&gt;
It is important that we know how to check data types in Python, this is a basic concept that will come in handy when we get to more advanced topics like Data Preprocessing and Analysis. &lt;br&gt;
We check the type of our data by using the type() method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(type(x))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(type(y))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;int&lt;/code&gt;&lt;br&gt;
&lt;code&gt;str&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.2 Python Variable Naming Rules&lt;/strong&gt;&lt;br&gt;
The following are the some good, bad and different naming conventions. &lt;br&gt;
The Good shows some good naming conventions that can be used and that is accepted by developers.&lt;br&gt;
The Bad shows some bad practices that shouldn't be used while coding. &lt;br&gt;
The Different shows that each individual variable is independent of the others, they all have the same spelling but the fact that some are capital letters and some aren't. They are all different.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Good: spam  eggs  spam23  _speed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Bad: 23spam  #sign   var.12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Different: spam   Spam   SPAM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>datascience</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
