<?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: Arunesh kumar</title>
    <description>The latest articles on DEV Community by Arunesh kumar (@kingarunesh).</description>
    <link>https://dev.to/kingarunesh</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%2F971316%2Fa6f1c5df-7afe-4cc6-85ef-3c87666fea10.jpeg</url>
      <title>DEV Community: Arunesh kumar</title>
      <link>https://dev.to/kingarunesh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kingarunesh"/>
    <language>en</language>
    <item>
      <title>Guess The Number Game in Python</title>
      <dc:creator>Arunesh kumar</dc:creator>
      <pubDate>Tue, 14 Feb 2023 22:39:25 +0000</pubDate>
      <link>https://dev.to/kingarunesh/guess-the-number-game-in-python-45l6</link>
      <guid>https://dev.to/kingarunesh/guess-the-number-game-in-python-45l6</guid>
      <description>&lt;p&gt;We are going to build guess number game using the while loop.&lt;br&gt;
There we will generate a random number to save as a secret number then we will ask them to user guess if the user's number matches our secret number then the user will win or else the user will lose the game.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rules of Game:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User can guess a number max 5 times or else the user will lose the game&lt;/li&gt;
&lt;li&gt;If users guess a high number then we will tell them you are high&lt;/li&gt;
&lt;li&gt;If users guess a low number then we will tell them you are low&lt;/li&gt;
&lt;li&gt;If the user has lost the game then at the end we will tell GAME OVER&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the code 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import random


secret_number = random.randint(1, 20)
i = 1


while i &amp;lt;= 5:
    user = int(input("Enter your guess number\n"))


    if user == secret_number:
        print("Correct Number")
        break
    elif user &amp;gt; secret_number:
        print("To High")
    elif user &amp;lt; secret_number:
        print("To Low")


    if i == 5:
        print("GAME OVER")

    i += 1

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

&lt;/div&gt;



</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
