<?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: Dhanya Hegde</title>
    <description>The latest articles on DEV Community by Dhanya Hegde (@dhanyahegde01).</description>
    <link>https://dev.to/dhanyahegde01</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%2F562295%2F3e0edac0-867a-474f-9685-11997400bda0.jpeg</url>
      <title>DEV Community: Dhanya Hegde</title>
      <link>https://dev.to/dhanyahegde01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dhanyahegde01"/>
    <language>en</language>
    <item>
      <title>New to Python? Here is a fun project to help you get  started.</title>
      <dc:creator>Dhanya Hegde</dc:creator>
      <pubDate>Wed, 20 Jan 2021 13:40:10 +0000</pubDate>
      <link>https://dev.to/dhanyahegde01/new-to-python-here-is-a-fun-project-to-help-you-get-started-1ei9</link>
      <guid>https://dev.to/dhanyahegde01/new-to-python-here-is-a-fun-project-to-help-you-get-started-1ei9</guid>
      <description>&lt;h3&gt;
  
  
  ROCK🥌,PAPER📄,SCISSORS✂
&lt;/h3&gt;

&lt;p&gt;I think all of us have played this game when we were kids and &lt;br&gt;
still do play it to decide who goes first in doing something.&lt;br&gt;
How about creating your own virtual rock, paper, scissors game &lt;br&gt;
in python? Sounds exciting right?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The best part about creating this game is that you don't have to be a professional in Python.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You just have to know certain basics about conditional &lt;br&gt;
statements like &lt;em&gt;if, elif, then using the input function and the random module.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Try it out on your own or take help from my code down below👇 .&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My game is as beginner friendly as possible as I haven't used a lot of additional functionality to make it look better. If you are a little more familiar with python you can use images instead of numbers to make it look better.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MY CODE&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;import random&lt;br&gt;
game_numbers = [0,1,2]&lt;/p&gt;

&lt;p&gt;user_choice = int(input("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors.\n"))&lt;/p&gt;

&lt;p&gt;computer_choice = random.randint(0, 2)&lt;br&gt;
print("Computer chose:")&lt;br&gt;
print(game_numbers[computer_choice])&lt;/p&gt;

&lt;p&gt;if user_choice &amp;gt;= 3 or user_choice &amp;lt; 0: &lt;br&gt;
  print("You typed an invalid number, you lose!") &lt;br&gt;
elif user_choice == 0 and computer_choice == 2:&lt;br&gt;
  print("You win!")&lt;br&gt;
elif computer_choice == 0 and user_choice == 2:&lt;br&gt;
  print("You lose")&lt;br&gt;
elif computer_choice &amp;gt; user_choice:&lt;br&gt;
  print("You lose")&lt;br&gt;
elif user_choice &amp;gt; computer_choice:&lt;br&gt;
  print("You win!")&lt;br&gt;
elif computer_choice == user_choice:&lt;br&gt;
  print("It's a draw")&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>python</category>
    </item>
  </channel>
</rss>
