<?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: Gaicugi</title>
    <description>The latest articles on DEV Community by Gaicugi (@gaicugi).</description>
    <link>https://dev.to/gaicugi</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%2F815212%2F1b963fd0-0883-4613-a861-91eb597e08d5.png</url>
      <title>DEV Community: Gaicugi</title>
      <link>https://dev.to/gaicugi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gaicugi"/>
    <language>en</language>
    <item>
      <title>PYTHON FOR EVERYONE: MASTERING PYTHON THE RIGHT WAY</title>
      <dc:creator>Gaicugi</dc:creator>
      <pubDate>Fri, 04 Mar 2022 22:08:09 +0000</pubDate>
      <link>https://dev.to/gaicugi/python-for-everyone-mastering-python-the-right-way-4k1</link>
      <guid>https://dev.to/gaicugi/python-for-everyone-mastering-python-the-right-way-4k1</guid>
      <description>&lt;p&gt;Why Python? For someone who is just but beginning to explore the realms of a programming languages, that is a question that is likely to come up. Whereas most of the times we are introduced into ‘ideal’ programming language by our peers, mentors or lecturers, we find ourselves asking if this is going to work for you. Well yes, Python is the ideal programming language not only for beginners but for professionals as well. Why you might ask?&lt;/p&gt;

&lt;p&gt;Well, other than its easy to master syntax and short, concise and readable classes that are not cumbersome to the reader, Python is so versatile. At least hear me out. Python can do almost everything in the programming world. You want to venture into data science? Python. Did someone say Artificial Intelligence? Python. What about machine learning? Why not! I am not sure if you can do this, but what about web development? Yes of course! That is not to say that other languages are not as great but why learn other languages whereas you can learn one major language that will get the job done. Python’s ability to get the job done is honestly the only reason I can come up as a justification why this large companies use it to develop their applications. In fact, Google has listed Python as being one of its four major languages.&lt;/p&gt;

&lt;p&gt;While this article is about mastering Python the right way, I would not necessarily say that there is a formula one has to use in order to master or rather have basic knowledge of python. However, I think that there are measure or steps that are integral in learning the language. &lt;/p&gt;

&lt;p&gt;To begin with, practice. I cannot really place a price on the importance of practice not only to Python, but to any programming language in particular. Just code, code and code! While being a beginner at coding could be really frustrating due to the constant errors arising and sometimes being entirely clueless on exactly what is going on, I can promise you it does get better. No guru at coding started where they are today anyway. Practice has this compounding magical effect that is not felt immediately but over days, you certainly start seeing results as you are way better than before you even started working on it.&lt;/p&gt;

&lt;p&gt;Moreover, put yourself out there. This would mean either engaging in workshops or putting yourself in a community that you can easily identify with. You would be surprised by the amount of knowledge one can extract out of this workshops. This is because here you get to interact with great minds that have been doing this long enough hence are easily able to guide you through it. Furthermore, associating yourself with an online community allows you to be in an environment where you can easily learn, be challenged and nurture your skills&lt;/p&gt;

&lt;p&gt;Lastly, do research and engage in learning activities. They is so much information that is out there that one just cannot fully exploit. While back in the day people would complain of insufficient reading materials, that is no longer a problem in today’s world. There are stacks and stacks of material in the internet today raging from articles, books that are softcopies, YouTube videos as well as free online courses. So essentially, one should be able to use this materials to their advantage in order to learn Python efficiently.&lt;/p&gt;

&lt;p&gt;Lastly, learning Python is completely easy, I mean it has the easiest syntax I have ever come across. However, consistency and practice should be the two keywords a learner should uphold&lt;/p&gt;

</description>
      <category>python</category>
      <category>github</category>
      <category>luxacademy</category>
    </item>
    <item>
      <title>Data structures and algorithms with python.</title>
      <dc:creator>Gaicugi</dc:creator>
      <pubDate>Mon, 21 Feb 2022 20:37:44 +0000</pubDate>
      <link>https://dev.to/gaicugi/data-structures-and-algorithms-with-python-47na</link>
      <guid>https://dev.to/gaicugi/data-structures-and-algorithms-with-python-47na</guid>
      <description>&lt;p&gt;Data structures and algorithms with python.&lt;br&gt;
Data structures are an integral part of any program that deals with data especially because they deal with the storage of data while the program is in execution. Algorithms on the other hand are a set of step by step instructions that help with processing of data sequentially. Data in programming comes in a variety of ways. Integers for instance are numerical values that do not have a fractional part. Boolean is a set of true or false values whereas strings are the set of all finite sequence of characters. Data structures can be classified into two major categories that is linear or non-linear data structures. Examples of linear data structures include arrays, queues, stacks and linked lists. Non-linear data structures on the other hand include trees.&lt;br&gt;
Lists, tuples and dictionaries are similar in that they are used to store variables. However, as much as the three perform almost the same functions, they are very different from each other in their operations. Lists for instance, are used to store many variables in a single variables. [] are used in their implementation. They are mutable data in that the values in particular positions can be changed even after being keyed in. Tuples on the other hand are very similar to lists but the values cannot be changes hence are immutable. () are  used. Dictionaries on the hand, are very different from lists and tuples in that they are organized and accessed using keys and values unlike tuples and lists that are accessed based on the location. This is because they are not ordered items. {} are used. Sets are unordered and unique items therefore they cannot be indexed.{} are used here&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_Lists_
Mylist = [“car”, [2, 7, 6], [“n”]
print( Mylist)

_Tuples _
mytuple = (“car”, “school”, “book”)
print(mytuple) 

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stacks are an example of linear data structures that use the LIFO technique that is, last in first out. This means that they only allow addition and deletion from one end. Several computations can be done on stacks such as pop, push, peek, is full and is empty. The peek operation provides the top value of the stack without necessarily removing it. The push operation allows addition of an element to the top of the stack. Pop operation allows the top most data element to be decremented to a lower position hence point to the next value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_Is full ()_
begin procedure is full
if top equals to MAXSIZE 
return true
else
return false
end if 
end procedure

_Is empty ()_
begin procedure is empty
if top less than 1
  return true
  else
  return false
  end if
  end procedure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Queues on the other hand are a FIFO that is first in first out. Essentially, queues allow insertion of elements from one end and deletion from the other end. Deletion occurs from the front end while insertion can occur at the rear end only and not the vice versa. For an empty queue, the index of both the rear and the front will be -1. Every time an element is inserted, rear is incremented by one. Basic operations in a queue are enqueue and dequeue. Enqueue is adding an element from a queue while dequeue is removing an element from the queue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_Enqueue algorithm_
Procedure enqueue data
if queue is full
return overflow error
end if
rear     rear  +1
queue[rear] data
return true
end procedure

_Dequeue algorithm_
Procedure dequeuer
If queue is empty
Return underflow error
End if data = queue [front]
front   front +1
return true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Linked lists are another example of linear data structures. Linked lists re a non-sequential collection of data items. They use pointers to allocate memory. Linked lists are a series of nodes linked together whereby each node has two parts. The first part of the node is the info part and has the element whereas the second part is the link which is a pointer used to link to the next node. Each node is allocated in the list by use of the malloc function. The start of the link which is the first node lacks an element as it only has the pointer. The last node of the list has an element but lacks a link therefore is mostly denoted by  X to show that it is null. Basic operations in a linked list are creation, insertion, deletion and traversal. Creation is the basically creating a linked list. Insertion is inserting a new node at a particular position in a linked list. Deletion is to delete a node. It can occur at the beginning, end or any position in the linked list. Traversal is the process of going through nodes in the list. It can be either forward traversal that is traversing from the first node to the last node, or backward traversal that is traversing from the last node to the first node.&lt;/p&gt;

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

</description>
      <category>webdev</category>
      <category>python</category>
      <category>github</category>
    </item>
    <item>
      <title>INTRODUCTION TO MODERN PYTHON.</title>
      <dc:creator>Gaicugi</dc:creator>
      <pubDate>Mon, 14 Feb 2022 16:44:47 +0000</pubDate>
      <link>https://dev.to/gaicugi/introduction-to-modern-python-672</link>
      <guid>https://dev.to/gaicugi/introduction-to-modern-python-672</guid>
      <description>&lt;p&gt;I am sure that python is not a new word for most people especially those from a programming background and even to those who are not must have heard a word or two about it. Essentially, python is a programming language that is easy to learn and a solution to several modern-day programing hurdles. So yes, python has nothing to do with snakes but is basically a very useful programming language Having been developed by Guido van Rossum in the late 1980s, python has gained a lot of popularity in the present world. Python is a diverse language that is easy to learn as it does not differ from other programming languages such as Java, Fortran, C and C++. However, it is worth noting that python stands out from other languages in that it is reliable, its syntax is easy to understand and is faster to execute as compared to other languages.&lt;/p&gt;

&lt;p&gt;Python is considered an object-oriented, procedural and functional programming language. An object-oriented language simply means that it uses objects to represent real world entities. Moreover, it being procedural that the program executes from the first command keyed in to the last. On the hand, what is meant by a functional language is that the language is built over logical functions rather than the execution of commands. Basically, functions in python are defined using the ‘def’ keywords. Keywords are words that have a special meaning in a programming language therefore have to avoid being used to avoid confusion. An example of a function in python is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def my_function():
  print("function exist!")

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is also important to note that Python is a case sensitive language. This means that if an uppercase letter was used anywhere in an object, if a lowercase letter is used in place of the uppercase, an error will result as the compiler reads as two different things hence execution will not take place.&lt;/p&gt;

&lt;p&gt;Arguably, python is used in various domains has many libraries. Some of the top libraries that python has include Pandas, Scipy, Django, Kivy, NumPy, IPython and PyTorch.&lt;/p&gt;

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

&lt;p&gt;Django for instance, is used for developing the back end of websites. Scipy on the other hand has features like those in MATLAB, useful for processing multidimensional arrays especially in engineering and mathematics. IPython is used in parallel computing whereas Kivy is used in Graphic User Interface (GUI), to develop multi-touch applications. Meanwhile, NumPy and Pandas do not have much difference as they all deal with mathematical computations. However, despite the small similarities, the three operate in completely different contexts. NumPy for instance, is mostly used in providing objects for multi-dimensional arrays hence facilitating operations on large data therefore ensuring efficient execution of such operations. This is mostly because they use less memory space as compared to Pandas. Pandas on the other hand, are helpful when it comes to data manipulation and analysis. This is done as it offers data structures enabling manipulation of time series and numerical tables. Pandas are capable of offering in-memory 2-dimensional table data frame hence making them at times slower than NumPy. Lastly, PyTorch being a tensor library is used mainly in deep learning applications which require heavy matrix computations such as in machine learning. This goes on to illustrate further that although Python is a simple language, it is really powerful.&lt;/p&gt;

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