<?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: Naivedh</title>
    <description>The latest articles on DEV Community by Naivedh (@naivedh).</description>
    <link>https://dev.to/naivedh</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%2F264066%2F72ae13f3-e5bc-458b-bfbf-ddd9c3545f70.jpeg</url>
      <title>DEV Community: Naivedh</title>
      <link>https://dev.to/naivedh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/naivedh"/>
    <language>en</language>
    <item>
      <title>CodeRush</title>
      <dc:creator>Naivedh</dc:creator>
      <pubDate>Mon, 27 Jan 2020 15:31:47 +0000</pubDate>
      <link>https://dev.to/naivedh/coderush-4dpl</link>
      <guid>https://dev.to/naivedh/coderush-4dpl</guid>
      <description>&lt;p&gt;Organizing an event is a tough job. Promotion, designing banners, getting permissions, etc.. etc.. Here, I’m sharing my experience of organizing my first ever coding contest in my college, SVIT, Vasad.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FxezWwSI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rwgldx2e9h3odboqnal6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FxezWwSI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rwgldx2e9h3odboqnal6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The idea of organizing such an event was inspired by a friend of mine, Pranit who recently organized MLH Build Day. I was given an opportunity to organize this event by CodingBlocks.&lt;/p&gt;

&lt;p&gt;I saw tweet about an event called CodeSule which is a coding contest held by Codingblocks. Out of curiosity, I searched more about it and ended up finding a Campus Ambassador program by CodingBlocks. After reading more about this program, I found out that they provide a chance to organize Coding contests, Workshops, Hackathons and much more. Soon, I applied for the program and within a few days I got an interview call. After a few hours, I was informed that I had been chosen as the Campus Ambassador.&lt;/p&gt;

&lt;p&gt;Furthermore, I started planning to organize a Coding contest. So, my mentor from CodingBlocks and my friend Arpan helped me to plan the event. All I had to do next was to take required permissions from the college authorities for the event. Next step into this journey would be to prepare enrollment forms, posters and start promotions, which was interestingly taken care of. The most challenging part for me was when an HOD asked me to present a small interactive session on “Why Competitive Coding and What are the approaches?”&lt;/p&gt;

&lt;p&gt;It was challenging for me because I had never presented a session before in front of such a large group of people. I felt nervous at first but it turned out to be amazing as I loved the interaction with the audience. This is how I eventually started loving Public Speaking and interaction.&lt;/p&gt;

&lt;p&gt;A day before the event I was a bit nervous because of this session I had to present. Here comes Devam(co-organizer/buddy) who helped me out with these issues.&lt;/p&gt;

&lt;p&gt;So, now the Big Day that I have been planning for weeks. My team and I were at the venue and started setting up everything prior to the event, I was a bit nervous at first but I carried it nicely with such a nice and supporting audience. We conducted 3 contests in total:&lt;/p&gt;

&lt;p&gt;● Maximum Tweet Contest&lt;/p&gt;

&lt;p&gt;● Kahoot Contest&lt;/p&gt;

&lt;p&gt;● Coding Contest&lt;/p&gt;

&lt;p&gt;Starting off with the coding contest, We faced some technical issues but the CodingBlocks team was very helpful in tackling them. During the event, our HOD visited us and she was delighted to see everyone indulged in the event.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8x1v7j4U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/pjaflaaxlbsawdeiv0ik.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8x1v7j4U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/pjaflaaxlbsawdeiv0ik.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the Coding and Maximum Tweet contests, we held the last contest of the day that was the Kahoot Contest. It was simple a general quiz. All the participants loved it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hKlhN1CR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9psrnyb1tpzzgaiph0rx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hKlhN1CR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9psrnyb1tpzzgaiph0rx.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, Devam and I declared the winners for all the three contests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zMvITIRL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/e5f5pi13jy4zc1xut9jb.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zMvITIRL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/e5f5pi13jy4zc1xut9jb.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CftaMraJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0tkn31lz4l3zv0wqkqnl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CftaMraJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0tkn31lz4l3zv0wqkqnl.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically, This is how I organized my very own Coding event.&lt;/p&gt;

</description>
      <category>coding</category>
      <category>dscgoogle</category>
      <category>codingblocks</category>
    </item>
    <item>
      <title>Swastik Pattern in C++</title>
      <dc:creator>Naivedh</dc:creator>
      <pubDate>Wed, 13 Nov 2019 18:24:42 +0000</pubDate>
      <link>https://dev.to/naivedh/swastik-pattern-in-c-5hco</link>
      <guid>https://dev.to/naivedh/swastik-pattern-in-c-5hco</guid>
      <description>&lt;p&gt;Hello World!!&lt;br&gt;
So, Today we are going to talk about patterns in c++. Some people have a question why Patterns?? My answer to it is "Improves your Logic" and if you're going to sit in a Campus Interview I would suggest you, go through patterns, improve your logic because many times there are questions about patterns and logic.&lt;/p&gt;

&lt;p&gt;So let's, Start today we will learn a pattern called Swastik.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fik5i3isuhhgmpr01lhqp.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fik5i3isuhhgmpr01lhqp.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would suggest you try it out the pattern first if you get stuck go through the code and if you are a newbie follow along.&lt;/p&gt;

&lt;p&gt;First, we declare variables and ask the user for the number of row/columns(i.e 'n') and then we calculate mid-value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F1r2hlzuhkktdwh613nep.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F1r2hlzuhkktdwh613nep.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, assume that we have entire n * n Matrix as shown below. We divide it into 4 parts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxwecg562d2bs2nm95xk3.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxwecg562d2bs2nm95xk3.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will use 2 for loops: &lt;br&gt;
(a)For rows of 1 to mid-value(first 3 rows in the above image ).&lt;br&gt;
(b)For rows of mid-value to n(next 2 rows in the above image).&lt;/p&gt;

&lt;p&gt;Each for loop contains 2 for loops:&lt;br&gt;
(c)For a column of 1 to mid-value(left side).&lt;br&gt;
(d)For a column of mid-value to n(right side).&lt;/p&gt;

&lt;p&gt;We enter the first main loop. In this loop, we loop through the 1st part out of 4 parts.&lt;br&gt;
now if j==0 or j==mid or i==mid we print "*".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjxnjrur2hzk1qracjljb.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjxnjrur2hzk1qracjljb.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, loop through the 2nd part out of 4 parts. If i==0 or i==mid we will print "*".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fwlc6ugddjhhp804as0ko.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fwlc6ugddjhhp804as0ko.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We enter the Second main loop. In this loop, we loop through the 3rd part out of 4 parts. IF j==mid or i==n-1 we will print "*".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fz6uz38yc92jjs1dr2y5r.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fz6uz38yc92jjs1dr2y5r.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now loop through the last part. If j==n-1 we print "*".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F766ru4b78lqu15prs2lk.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F766ru4b78lqu15prs2lk.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, that's it. You can go through entire code at &lt;a href="https://github.com/Naivedh/Swastik" rel="noopener noreferrer"&gt;https://github.com/Naivedh/Swastik&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: The spacing provided before-after "*" is so that it looks good you can remove it.&lt;/p&gt;

&lt;p&gt;If you want to practice more patterns. Here are some of them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4rd7j3trnto0tx94olou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4rd7j3trnto0tx94olou.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F76y4hrnrq5cdtnarjl6s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F76y4hrnrq5cdtnarjl6s.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkiiqkm3sez69cxf23tni.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkiiqkm3sez69cxf23tni.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>pattern</category>
      <category>logic</category>
    </item>
    <item>
      <title>Retreiving anchor tag using BeautifulSoup</title>
      <dc:creator>Naivedh</dc:creator>
      <pubDate>Wed, 06 Nov 2019 17:19:13 +0000</pubDate>
      <link>https://dev.to/naivedh/retreiving-anchor-tag-using-beautifulsoup-bgc</link>
      <guid>https://dev.to/naivedh/retreiving-anchor-tag-using-beautifulsoup-bgc</guid>
      <description>&lt;p&gt;Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching and modifying the parse tree. It commonly saves the programmer's hours or days of work.&lt;/p&gt;

&lt;p&gt;The examples in this documentation should work the same way in Python 2.7 and Python 3.2.&lt;/p&gt;

&lt;p&gt;You need to install beautiful soup.&lt;/p&gt;

&lt;p&gt;We will import urllib, SSL, Beautiful soup.&lt;/p&gt;

&lt;p&gt;Urllib is a package that collects several modules for working with URLs:&lt;br&gt;
    urllib.request for opening and reading URLs&lt;br&gt;
    urllib.error containing the exceptions raised by urllib.request&lt;br&gt;
    urllib.parse for parsing URLs&lt;br&gt;
    urllib.robotparser for parsing robots.txt files&lt;/p&gt;

&lt;p&gt;Secure Sockets Layer (SSL) is a networking protocol designed for securing connections between web clients and web servers over an insecure network, such as the internet. After being formally introduced in 1995, SSL made it possible for a web server to securely enable online transactions between consumers and businesses.&lt;/p&gt;

&lt;p&gt;Note: Don't worry about the SSL and the next 3 lines. It is just a way to ignore errors if you have SSL certification errors&lt;/p&gt;

&lt;p&gt;So, let's start.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eINidq9w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/b3iep1ayblokcjtumv1y.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eINidq9w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/b3iep1ayblokcjtumv1y.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we will ask the user to enter the Url. We will use urllib.request.urlopen().read() method to read data from web pages. Then we will pass this data to Beautiful soup so that it will deal with all the nasty bit of code and it will convert UTF-8 to Unicode as Python follows Unicode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--foBa8HnL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/up8gx9zzbjvkeft7pmdm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--foBa8HnL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/up8gx9zzbjvkeft7pmdm.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we retrieve all the anchor tags.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t3ZKq9dq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3rdzqc8whe2t9nc3k5ov.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t3ZKq9dq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3rdzqc8whe2t9nc3k5ov.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, we loop through all tags and we pull out all text in href.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--caqYDpRb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/w574t7dxi4s4blxr9pwq.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--caqYDpRb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/w574t7dxi4s4blxr9pwq.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, let's try it out.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N52Rzjfo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9xb8etxo2ol3hfur2k3e.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N52Rzjfo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9xb8etxo2ol3hfur2k3e.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it. If you have any Doubts feel free to comment.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Rock Paper Scissors in Python</title>
      <dc:creator>Naivedh</dc:creator>
      <pubDate>Wed, 06 Nov 2019 16:12:51 +0000</pubDate>
      <link>https://dev.to/naivedh/rock-paper-scissors-in-python-136h</link>
      <guid>https://dev.to/naivedh/rock-paper-scissors-in-python-136h</guid>
      <description>&lt;p&gt;Game Rules:&lt;br&gt;
If user_1  and user_2 have same choice there is a TIE.&lt;br&gt;
If choices are Paper and Scissors, Scissors wins.&lt;br&gt;
If choices are Paper and Rock, Paper wins.&lt;br&gt;
If choices are Rock and Scissors, Rock wins.&lt;/p&gt;

&lt;p&gt;This small project will help you improve your basics such as loops, nested if...else, variables, random module.&lt;/p&gt;

&lt;p&gt;So, guys are you ready to create Rock Paper Scissors using Python. So let's start.&lt;/p&gt;

&lt;p&gt;First, we will import the Random module in python.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jqDiySes--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wzn55miayopv7i5n1hl0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jqDiySes--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wzn55miayopv7i5n1hl0.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we will use the while loop to take input until the user wants to play.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tZITYNCH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vhuug1mv3thqc33ma9r9.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tZITYNCH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vhuug1mv3thqc33ma9r9.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's take input from the user using input() function in python. Then create the computer choice using randint() function from the Random module.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XE_yfzf0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wvw8hlvu6fly1kkfkjg7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XE_yfzf0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wvw8hlvu6fly1kkfkjg7.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we will convert the computer's input from 1, 2, 3 into 'p', 'r','s'.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NLIwc8fb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6x5co275r08wm07ewqjl.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NLIwc8fb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6x5co275r08wm07ewqjl.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, compare the user choice with computer choice using nested if...else. And if both choices are same there is a tie.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0PH_i4-g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/8x278tdd1nv0cfpd21pa.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0PH_i4-g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/8x278tdd1nv0cfpd21pa.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, take input whether the user wants to play again if no then break the loop.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u0B9Flyp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2vdi5k8f6nm9sqx6l0go.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u0B9Flyp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2vdi5k8f6nm9sqx6l0go.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, that's it you are ready to play. If you enjoyed, do comment. If you have any doubt feel free to ask.&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>project</category>
    </item>
    <item>
      <title>Guess Game in Python</title>
      <dc:creator>Naivedh</dc:creator>
      <pubDate>Wed, 06 Nov 2019 05:51:58 +0000</pubDate>
      <link>https://dev.to/naivedh/guess-game-in-python-2khl</link>
      <guid>https://dev.to/naivedh/guess-game-in-python-2khl</guid>
      <description>&lt;p&gt;Hey Guys, So are you ready for your first python project? Then let’s get on with it, I would recommend you to code along. This game will help you clear out your basics such as Input-Output, Random module, Loops, if… else.&lt;/p&gt;

&lt;p&gt;First import random module.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NsH4chON--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/fmf33l5cbd3wul0r7ojm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NsH4chON--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/fmf33l5cbd3wul0r7ojm.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next we will use randint function from Random module for generating a random number between 1 to 100.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nasXTg8A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lfr0c7x6qui9e5pf4yy8.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nasXTg8A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lfr0c7x6qui9e5pf4yy8.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, Let’s take input from user. Input is in the form of string so we will convert it to int using int().&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--O15hZHz4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/1bsqog13p3tkh41n7774.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--O15hZHz4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/1bsqog13p3tkh41n7774.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s use while loop to compare the value of user and computer again and again until they are equal. Do not forget to add colon(:) at the end. You can also use for loop and give limited number of chances to User.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lakyUk-G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/23yp3uwcku7j8izesn7f.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lakyUk-G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/23yp3uwcku7j8izesn7f.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we will use if … elif programming constructs to match the numbers. We will use 4 statement to check the number is high, a little high, low or a little low. Take a difference of 10(i.e. if difference is greater then 10 then print go high or go low else print go little high or go little low ) to make game a little easy. Don’t forget to take input again if value doesn’t match.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LMSp5ToU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/bzz2ucylj0ewm9btd9jl.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LMSp5ToU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/bzz2ucylj0ewm9btd9jl.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great work! You have created your first project.You can get the entire code here. You can even add more to it such as add a for loop instead of while loop for 10 inputs. Give a Scorecard at the end of game. If User Guesses the Number in first attempt then he gets 100 points, if in 3rd attempt he/she gets 70 points, if in 6th he/she gets 40 points and so on. . .&lt;/p&gt;

&lt;p&gt;You can create the same project in different languages too. Do try it out if you are interested in other languages.&lt;/p&gt;

&lt;p&gt;Note: Do not forget colon (:) after for, while or if else statement. Take care of indentation too.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
