<?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: Divya Kelaskar</title>
    <description>The latest articles on DEV Community by Divya Kelaskar (@divyakelaskar).</description>
    <link>https://dev.to/divyakelaskar</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%2F379489%2F6550815c-23cb-4cc1-bc07-4ef54d6d7ec8.png</url>
      <title>DEV Community: Divya Kelaskar</title>
      <link>https://dev.to/divyakelaskar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/divyakelaskar"/>
    <language>en</language>
    <item>
      <title>🗃️ Filecheck GitHub action</title>
      <dc:creator>Divya Kelaskar</dc:creator>
      <pubDate>Sun, 05 Dec 2021 16:12:29 +0000</pubDate>
      <link>https://dev.to/divyakelaskar/filecheck-github-action-h3d</link>
      <guid>https://dev.to/divyakelaskar/filecheck-github-action-h3d</guid>
      <description>&lt;h3&gt;
  
  
  My Workflow
&lt;/h3&gt;

&lt;p&gt;A simple GitHub action to check the list of files on a push and pull request.&lt;/p&gt;

&lt;h3&gt;
  
  
  Submission Category:
&lt;/h3&gt;

&lt;p&gt;Wacky Wildcards&lt;/p&gt;

&lt;h3&gt;
  
  
  Yaml File or Link to Code
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/divyakelaskar"&gt;
        divyakelaskar
      &lt;/a&gt; / &lt;a href="https://github.com/divyakelaskar/filecheck-github-action"&gt;
        filecheck-github-action
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A simple GitHub action to check the list of files on a push or a pull request.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
🗃️ Filecheck GitHub action&lt;/h1&gt;
&lt;p&gt;A simple GitHub action to check the list of files on a pull request.&lt;/p&gt;
&lt;h2&gt;
Inspiration&lt;/h2&gt;
&lt;p&gt;I have been reading the submission blogs for this year's GitHub Actions Hackathon. Also, most of the opensource repos on GitHub actively use GitHub actions to automate the workflow efficiently. Thus, I thought of building one and learning how about use them.&lt;/p&gt;
&lt;h2&gt;
What it does&lt;/h2&gt;
&lt;p&gt;Checks the list the files in the repository on a pull request.&lt;/p&gt;
&lt;h2&gt;
How I built it&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Created a repo on GitHub.&lt;/li&gt;
&lt;li&gt;Formed a &lt;code&gt;.github/workflows&lt;/code&gt; directory.&lt;/li&gt;
&lt;li&gt;Made a &lt;code&gt;.yml&lt;/code&gt; file of the workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Challenges I ran into&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Choosing a learning resource (chose the official docs)&lt;/li&gt;
&lt;li&gt;Adapting the YAML syntax&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Accomplishments that I'm proud of&lt;/h2&gt;
&lt;p&gt;Learned about GitHub actions by building one.&lt;/p&gt;
&lt;h2&gt;
What I learned&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;How to automate things with GitHub actions.&lt;/li&gt;
&lt;li&gt;Worked with YAML files&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/divyakelaskar/filecheck-github-action"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/actions/checkout/releases/tag/v2.0.0"&gt;actions/checkout@v2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/actions/quickstart"&gt;GitHub Actions Official Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>actionshackathon21</category>
    </item>
    <item>
      <title>My journey of building games</title>
      <dc:creator>Divya Kelaskar</dc:creator>
      <pubDate>Mon, 29 Nov 2021 16:54:26 +0000</pubDate>
      <link>https://dev.to/divyakelaskar/my-journey-of-building-games-e1e</link>
      <guid>https://dev.to/divyakelaskar/my-journey-of-building-games-e1e</guid>
      <description>&lt;p&gt;In this blog post, I will be sharing my journey as a game developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  How did I come to know about game development ?
&lt;/h2&gt;

&lt;p&gt;Well, my current college semester has the "Game Programming" subject. It consists of :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Theory&lt;/li&gt;
&lt;li&gt;Maths&lt;/li&gt;
&lt;li&gt;DirectX&lt;/li&gt;
&lt;li&gt;Unity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unity intrigued me as it visually shows the theoretical concepts (&lt;em&gt;like world space, local space, camera angles, etc.&lt;/em&gt;) which helps to understand them better.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I got started ?
&lt;/h2&gt;

&lt;p&gt;My first Unity project isn't a full-fledged game. It is a simple prototype which runs on PC and Android. There isn't any cool stuff in it but I believe the project gave me a great headstart. I came to know the Unity app's UI, components, prefabs, types of builds available, etc.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/divyakelaskar"&gt;
        divyakelaskar
      &lt;/a&gt; / &lt;a href="https://github.com/divyakelaskar/platformer-3d-game"&gt;
        platformer-3d-game
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A 3D platformer game prototype created with Unity3D. Works on Android and Desktop.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
🎮 Mini Game&lt;/h1&gt;
&lt;p&gt;A simple 3D platformer game prototype created with Unity3D. Works on Android and Desktop.&lt;/p&gt;
&lt;h4&gt;
📱 Android&lt;/h4&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://user-images.githubusercontent.com/56636487/131168040-ff099e4a-d808-410f-9da0-c2b49e377539.gif"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZJ_Dueyx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://user-images.githubusercontent.com/56636487/131168040-ff099e4a-d808-410f-9da0-c2b49e377539.gif" height="auto" width="auto"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
🖥️ Desktop&lt;/h4&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://user-images.githubusercontent.com/56636487/131164871-5c4dee3f-b58f-400e-83f3-5af0d0035b6f.gif"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--whuSvh1q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://user-images.githubusercontent.com/56636487/131164871-5c4dee3f-b58f-400e-83f3-5af0d0035b6f.gif" height="auto" width="500px"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/divyakelaskar/platformer-3d-game"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;The next 2 projects &lt;a href="https://github.com/divyakelaskar/Space-Shooter-Game"&gt;Space Shooter&lt;/a&gt; and &lt;a href="https://github.com/divyakelaskar/UFO-Game"&gt;2D UFO&lt;/a&gt; are standalone PC games. They made me aware of the extensive resources by Unity. I mostly find myself browsing these 3 websites often :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.unity.com"&gt;Official docs&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://forum.unity.com"&gt;Official Forum&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://learn.unity.com"&gt;Unity Learn : Official Tutorials&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I had used pre-made models for these 2 games. It got me curious about modelling and game art. So, I tried out 3D modelling for a while :&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;
      &lt;div class="ltag__twitter-tweet__media"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bJe0XUiS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/FB1ZMeWVgAQzDp7.jpg" alt="unknown tweet media content"&gt;
      &lt;/div&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--TcKrzS24--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1422814724861829122/ZczdZOO1_normal.jpg" alt="Divya Kelaskar profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Divya Kelaskar
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        @divya_kelaskar
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ir1kO05j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      Completed making my first 3D art ! It was an awesome experience. Looking forward to create more things in 3D !&lt;br&gt;Check out the detailed post 👇&lt;br&gt;&lt;a href="https://twitter.com/hashtag/b3d"&gt;#b3d&lt;/a&gt; 
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      16:32 PM - 16 Oct 2021
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1449412953992691712" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fFnoeFxk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-reply-action-238fe0a37991706a6880ed13941c3efd6b371e4aefe288fe8e0db85250708bc4.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1449412953992691712" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k6dcrOn8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-retweet-action-632c83532a4e7de573c5c08dbb090ee18b348b13e2793175fea914827bc42046.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/like?tweet_id=1449412953992691712" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SRQc9lOp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-like-action-1ea89f4b87c7d37465b0eb78d51fcb7fe6c03a089805d7ea014ba71365be5171.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;After building Android and PC based games, I thought of trying out WebGL games. These can played in a browser. Thus, I built &lt;a href="https://github.com/divyakelaskar/Roll-a-ball"&gt;Roll a ball&lt;/a&gt; as a browser based game and released my first game on &lt;code&gt;itch.io&lt;/code&gt;. You can try it live here 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://divyakelaskar.itch.io/roll-a-ball"&gt;https://divyakelaskar.itch.io/roll-a-ball&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Things I learned :
&lt;/h2&gt;

&lt;p&gt;Scripting in Unity is a good way to learn C#. Prior to Unity, I hadn't worked with C#. It introduced to concepts of the C# language like namespaces. I feel that C# has a similar syntax to Java.&lt;/p&gt;

&lt;p&gt;The Unity's physics engine is amazing. Unity being visual helps to setup physics of your game. E.g, If a game object is able to pass through walls, we can add the physics components related to it. (&lt;em&gt;like rigidbody, box collider, etc.&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;Building games is fun. It comprises of making game objects, coding their behaviour, designing the game's UI, VFX, animation, graphics and many such things. Its been awesome to these things. (&lt;em&gt;bit by bit&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;Currently, I'm building a 3D FPS game for this year's  &lt;a href="https://itch.io/jam/game-off-2021"&gt;GitHub GameOff&lt;/a&gt;  game jam and documenting my progress on Twitter.&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;
      &lt;div class="ltag__twitter-tweet__media ltag__twitter-tweet__media__video-wrapper"&gt;
        &lt;div class="ltag__twitter-tweet__media--video-preview"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6bdCI4hr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/tweet_video_thumb/FEz6ENVVQAUmGWT.jpg" alt="unknown tweet media content"&gt;
          &lt;img src="/assets/play-butt.svg" class="ltag__twitter-tweet__play-butt" alt="Play butt"&gt;
        &lt;/div&gt;
        &lt;div class="ltag__twitter-tweet__video"&gt;
          
            
          
        &lt;/div&gt;
      &lt;/div&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--TcKrzS24--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1422814724861829122/ZczdZOO1_normal.jpg" alt="Divya Kelaskar profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Divya Kelaskar
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        @divya_kelaskar
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ir1kO05j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      Day 55 of &lt;a href="https://twitter.com/hashtag/100DaysOfCode"&gt;#100DaysOfCode&lt;/a&gt; &lt;br&gt;&lt;br&gt;Setting up the snaps 🏗️&lt;br&gt;&lt;br&gt;&lt;a href="https://twitter.com/hashtag/unity3d"&gt;#unity3d&lt;/a&gt; &lt;a href="https://twitter.com/hashtag/GitHubGameOff"&gt;#GitHubGameOff&lt;/a&gt; 
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      16:24 PM - 22 Nov 2021
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1462819212787798021" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fFnoeFxk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-reply-action-238fe0a37991706a6880ed13941c3efd6b371e4aefe288fe8e0db85250708bc4.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1462819212787798021" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k6dcrOn8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-retweet-action-632c83532a4e7de573c5c08dbb090ee18b348b13e2793175fea914827bc42046.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/like?tweet_id=1462819212787798021" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SRQc9lOp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-like-action-1ea89f4b87c7d37465b0eb78d51fcb7fe6c03a089805d7ea014ba71365be5171.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;That's it for this blog post. Till then,&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep exploring, keep building !
&lt;/h3&gt;

</description>
      <category>unity3d</category>
      <category>beginners</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Resources to get started with Python !</title>
      <dc:creator>Divya Kelaskar</dc:creator>
      <pubDate>Sat, 20 Jun 2020 13:03:38 +0000</pubDate>
      <link>https://dev.to/divyakelaskar/resources-to-get-started-with-python-4mo6</link>
      <guid>https://dev.to/divyakelaskar/resources-to-get-started-with-python-4mo6</guid>
      <description>&lt;p&gt;Hi everyone !&lt;/p&gt;

&lt;p&gt;Today I will be sharing some awesome resources to learn python for free! &lt;/p&gt;

&lt;p&gt;So, let’s begin 🎉&lt;/p&gt;

&lt;h1&gt;
  
  
  Automate the Boring Stuff with Python
&lt;/h1&gt;

&lt;p&gt;This ebook guides us through the various concepts of Python with hands-on, real-world applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PpcXgAJB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://automatetheboringstuff.com/images/automate_2e_cover.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PpcXgAJB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://automatetheboringstuff.com/images/automate_2e_cover.png" alt="Image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://automatetheboringstuff.com/"&gt;Link&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  FreeCodeCamp
&lt;/h1&gt;

&lt;p&gt;The tutorial covers most of the basic concepts in Python to get ready for intermediate Python programming.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rfscVS0vtbw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  GeeksForGeeks
&lt;/h1&gt;

&lt;p&gt;The website has topic-wise listing of the Python concepts. It starts with beginner-friendly topics and also has handled complex topics efficiently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n6xWU9YI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n6xWU9YI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png" alt="Image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/python-tutorial/"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Real Python
&lt;/h1&gt;

&lt;p&gt;If you are a real Pythonista, then this is the right place. You can learn Python, take part in quizzes or join with other Pythonistas here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OqFsinsx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://files.realpython.com/media/real-python-logo-square.28474fda9228.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OqFsinsx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://files.realpython.com/media/real-python-logo-square.28474fda9228.png" alt="Image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://realpython.com/"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Official Python Documentation
&lt;/h1&gt;

&lt;p&gt;Last but not the least ! The official Python docs. If you are refering them, you are surely a league ahead.&lt;/p&gt;

&lt;p&gt;I hope you found this helpful !&lt;/p&gt;

&lt;h1&gt;
  
  
  Thanks for reading !
&lt;/h1&gt;

</description>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Programming Principles worth following</title>
      <dc:creator>Divya Kelaskar</dc:creator>
      <pubDate>Wed, 10 Jun 2020 07:29:29 +0000</pubDate>
      <link>https://dev.to/divyakelaskar/programming-principles-worth-following-i43</link>
      <guid>https://dev.to/divyakelaskar/programming-principles-worth-following-i43</guid>
      <description>&lt;p&gt;So, today we are going to have a look into some well-known programming principles which always come handy while coding. &lt;/p&gt;

&lt;h1&gt;
  
  
  1. KISS : Keep It Simple Stupid
&lt;/h1&gt;

&lt;p&gt;The following quote has rightly explained it:&lt;/p&gt;

&lt;blockquote&gt;Any fool can write code that a computer can understand. Good programmers focus on writing the program in a humans understand.&lt;/blockquote&gt;

&lt;p&gt;&lt;cite&gt;Martin Fowler&lt;/cite&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. DRY : Don't Repeat Yourself
&lt;/h1&gt;

&lt;p&gt;Implement functions for the block of code commonly used in your program and call out the functions as needed rather rewriting the complete code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/RRerwvHrb0nxm/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/RRerwvHrb0nxm/giphy.gif" alt="TYPING CODE GIF" width="320" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3. 4C's : Clean Code, Clever Code
&lt;/h1&gt;

&lt;p&gt;The code we write is a way of our thinking to solve/create a given thing/scenario. It has to be different than the other. So, how do we grasp a thinking which is &lt;strong&gt;NOT&lt;/strong&gt; as same as ours ? &lt;br&gt;
Here comes our third point into play. We must aim for the best readability of our code so that others can understand your way of thinking, your way of coding. &lt;/p&gt;

&lt;blockquote&gt;Readability matters.&lt;/blockquote&gt;

&lt;p&gt;&lt;cite&gt;Tim Peters, (The Zen of Python)&lt;/cite&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  4. YAGNI : You Aren't Gonna Need It
&lt;/h1&gt;

&lt;p&gt;We usually comment the code from our code base thinking that we might need it in future. But, that's rarely going to happen. So, don't just let your code rot over there. You have the power of Git, USE IT !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/LR5S0IAxyu6hwtO0Ia/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/LR5S0IAxyu6hwtO0Ia/giphy.gif" alt="THINKING GIF" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With that, these are some of the programming principles which can upgrade your coding &amp;amp; programming skills.&lt;/p&gt;

</description>
      <category>beginners</category>
    </item>
    <item>
      <title>Common Ethics for better coding !</title>
      <dc:creator>Divya Kelaskar</dc:creator>
      <pubDate>Sun, 24 May 2020 14:46:42 +0000</pubDate>
      <link>https://dev.to/divyakelaskar/common-ethics-for-better-coding-5fgb</link>
      <guid>https://dev.to/divyakelaskar/common-ethics-for-better-coding-5fgb</guid>
      <description>&lt;p&gt;Last week I tried the Foobar challenge.&lt;/p&gt;

&lt;p&gt;It is a set of coding challenges of five levels. Difficulty increases as we proceed each level. We can code the solutions in Python or Java. My weapon was Python.&lt;/p&gt;

&lt;p&gt;I have completed 3 levels of the challenges (Further challenges are totally out of my reach!). Here are the lessons I learnt after attempting the challenge.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Make your concepts “crystal-clear”
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/QMoXJjGPsmJ6Pdc596/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/QMoXJjGPsmJ6Pdc596/giphy.gif" alt="Alt Text" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first challenge went quite easy. But during the second one I had to brush-up some points to be able to solve it. And that consumed my most of the time.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Solve the problem first
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/UKkes2qN2T70s/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/UKkes2qN2T70s/giphy.gif" alt="Alt Text" width="370" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Solving the question prior to coding gives us an idea of what and how to code. Starting to code in vague, leads to more confusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Test your code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/LmNwrBhejkK9EFP504/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/LmNwrBhejkK9EFP504/giphy.gif" alt="Alt Text" width="300" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Testing the code lets us know how we can improve our code for the correct solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Take your time
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/xih4bMlVJDGfra02eo/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/xih4bMlVJDGfra02eo/giphy.gif" alt="Alt Text" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All work and no play makes Jack dull. Thinking about a problem for long time doesn’t help much. Take a break. Fresh up your mind and then get back to code !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/W23HteMtqFbJ8xAtP7/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/W23HteMtqFbJ8xAtP7/giphy.gif" alt="Alt Text" width="480" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, how’s the article ? Share your coding/learning experiences down in the discussion.&lt;/p&gt;

&lt;p&gt;Thanks for reading !&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>python</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Guess the number with Python !</title>
      <dc:creator>Divya Kelaskar</dc:creator>
      <pubDate>Thu, 14 May 2020 16:55:48 +0000</pubDate>
      <link>https://dev.to/divyakelaskar/guess-the-number-with-python-k97</link>
      <guid>https://dev.to/divyakelaskar/guess-the-number-with-python-k97</guid>
      <description>&lt;p&gt;Today I will be sharing tips for making a "Guess the number" game with the Python programming language.&lt;/p&gt;

&lt;p&gt;Let's begin !&lt;/p&gt;

&lt;p&gt;👉 Import the random module to generate the numbers randomly in the game.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;random&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;💡 Introduce a infinite while loop.&lt;/p&gt;

&lt;p&gt;👉 Generate a random number, initialize the chances to zero.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;N U M B E R   G U E S S I N G   G A M E"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;You have 10 chances to guess the number."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# randint function to generate the random number between 1 to 100 
&lt;/span&gt;    &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 

    &lt;span class="s"&gt;""" number of chances to be given to the user to guess the number or it is the inputs
    given by user into input box here number of chances are 10 """&lt;/span&gt;
    &lt;span class="n"&gt;chances&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Guess a number (1 - 100):"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 Add a while loop to count the number of chances used and take the input from the user.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# While loop to count the number of chances 
&lt;/span&gt;    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;chances&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 

        &lt;span class="c1"&gt;# Enter a number between 1 to 100  
&lt;/span&gt;        &lt;span class="n"&gt;guess&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 Tally the user's input with the guess number accordingly.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Compare the user entered number  with the number to be guessed  
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 

            &lt;span class="s"&gt;""" if number entered by user is same as the generated number by randint
            function then  break from loop using loop control statement "break" """&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Congratulation YOU WON!!!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
            &lt;span class="k"&gt;break&lt;/span&gt;

        &lt;span class="c1"&gt;# Check if the user entered number is smaller than the generated number  
&lt;/span&gt;        &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
            &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Your guess was too low: Guess a number higher than"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 

        &lt;span class="c1"&gt;# The user entered number is greater than the generated number              
&lt;/span&gt;        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
            &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Your guess was too high: Guess a number lower than"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 Increase the value of the chances variable one at a time as the user will be using one chance at a time.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Increase the value of chance by 1 as 1 chance is used
&lt;/span&gt;        &lt;span class="n"&gt;chances&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 Verify if the user has identified the number or not.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="c1"&gt;# Check whether the user guessed the correct number  
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;chances&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"YOU LOSE!!! The number is"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👉 Ask a replay question and break the infinite while loop.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="n"&gt;ans&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Do you want to play again (y/n) : "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;ans&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s"&gt;'y'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="k"&gt;break&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That's it! Wasn't that simple ?&lt;br&gt;
You can also refer my GitHub repo :&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/divyakelaskar"&gt;
        divyakelaskar
      &lt;/a&gt; / &lt;a href="https://github.com/divyakelaskar/Guess-the-number"&gt;
        Guess-the-number
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A simple terminal game in python.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Guess the number&lt;/h1&gt;
&lt;p&gt;A simple terminal game in python.&lt;/p&gt;
&lt;h2&gt;
Try it out !&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://gitpod.io/#https://github.com/divyakelaskar/Guess-the-number/blob/master/Guess%20the%20number%20.py" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/76e60919474807718793857d8eb615e7a50b18b04050577e5a35c19421f260a3/68747470733a2f2f676974706f642e696f2f627574746f6e2f6f70656e2d696e2d676974706f642e737667" alt="Open in Gitpod"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/divyakelaskar/Guess-the-number"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



</description>
      <category>python</category>
      <category>codenewbie</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Create a turtles' race with Python!</title>
      <dc:creator>Divya Kelaskar</dc:creator>
      <pubDate>Thu, 07 May 2020 16:40:23 +0000</pubDate>
      <link>https://dev.to/divyakelaskar/create-a-turtles-race-with-python-1omh</link>
      <guid>https://dev.to/divyakelaskar/create-a-turtles-race-with-python-1omh</guid>
      <description>&lt;p&gt;Yeah you got it.&lt;br&gt;
Today we'll be making turtles' race by the Python language.&lt;br&gt;
The first main requirement here is the turtle module. Basically, this module lets us to introduce smaller-scale graphics in our Python. &lt;br&gt;
The next one is the random module.&lt;/p&gt;

&lt;p&gt;Let's get started 😜&lt;/p&gt;

&lt;p&gt;✅ Firstly, import the required modules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;turtle&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;randint&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;💡 There are different shapes of pointer available in the turtle module(like arrow, classic and turtle). As ours is a "Turtle Race", we need the 'turtle' and 'classic' shape.&lt;/p&gt;

&lt;p&gt;✅ We'll use the classic shape to trace the racing track.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# classic shape turtle
&lt;/span&gt;&lt;span class="nf"&gt;speed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;penup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;140&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;140&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# tracing the racing track
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;align&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;center&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;right&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;penup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;pendown&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;penup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="nf"&gt;backward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;160&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;left&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✅ List the specs of the first turtle, enter the turtle in the track and set the turtle ready for the race.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# first player details
&lt;/span&gt;&lt;span class="n"&gt;player_1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Turtle&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;player_1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;red&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;player_1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;turtle&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# first player proceeds to racing track
&lt;/span&gt;&lt;span class="n"&gt;player_1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;penup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;player_1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;160&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;player_1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pendown&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# 360 degree turn
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;turn&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;player_1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;right&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;36&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✅ Do the same for the rest of the turtles.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# second player details
&lt;/span&gt;&lt;span class="n"&gt;player_2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Turtle&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;player_2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;blue&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;player_2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;turtle&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# second player enters in the racing track
&lt;/span&gt;&lt;span class="n"&gt;player_2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;penup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;player_2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;160&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;70&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;player_2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pendown&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# 360 degree turn
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;turn&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;72&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;player_2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;left&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# third player details
&lt;/span&gt;&lt;span class="n"&gt;player_3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Turtle&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;player_3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;turtle&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;player_3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;green&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# third player enters in the racing track
&lt;/span&gt;&lt;span class="n"&gt;player_3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;penup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;player_3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;160&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;player_3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pendown&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# 360 degree turn
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;turn&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;player_3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;right&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# fourth player details
&lt;/span&gt;&lt;span class="n"&gt;player_4&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Turtle&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;player_4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;turtle&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;player_4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;orange&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# fourth player enters in the racing track
&lt;/span&gt;&lt;span class="n"&gt;player_4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;penup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;player_4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;160&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;player_4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pendown&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# 360 degree turn
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;turn&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;player_4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;left&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✅ Use the randint() to set the speed of the turtles.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# turtles run at random speeds
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;turn&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;player_1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="n"&gt;player_2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="n"&gt;player_3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="n"&gt;player_4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  That's it ! The race is ready to begin 🐢🐢🐢
&lt;/h2&gt;
&lt;h2&gt;
  
  
  You can also refer my GitHub repo:
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/divyakelaskar" rel="noopener noreferrer"&gt;
        divyakelaskar
      &lt;/a&gt; / &lt;a href="https://github.com/divyakelaskar/Turtle-Race" rel="noopener noreferrer"&gt;
        Turtle-Race
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A game created by using the turtle module 🐢
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;c&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>codenewbie</category>
      <category>python</category>
    </item>
    <item>
      <title>Make a simple game in python!</title>
      <dc:creator>Divya Kelaskar</dc:creator>
      <pubDate>Tue, 05 May 2020 07:10:14 +0000</pubDate>
      <link>https://dev.to/divyakelaskar/make-a-simple-game-in-python-109c</link>
      <guid>https://dev.to/divyakelaskar/make-a-simple-game-in-python-109c</guid>
      <description>&lt;p&gt;Hi devs!&lt;br&gt;
Today I will share some tips to make a simple stone paper scissor game in python. The game will be a Human vs Computer game.&lt;/p&gt;

&lt;p&gt;✔️ Import the random module by the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;random&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;"Why?"&lt;br&gt;
So that computer will generate its own choice.&lt;/p&gt;

&lt;p&gt;💡 Place a infinite while loop (You don't have to run program  again and again.)&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✔️ State the rules of the game.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Rules of the game   
&lt;/span&gt;    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"""Enter your choice : 
    a. Press '1' to select 'Stone'. 
    b. Press '2' to select 'Paper'.
    c. Press '3' to select 'Scissor'.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✔️ Take the input from the user according to the rules mention above.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Enter YOUR choice: "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✔️ Code the condition when user gives input out of the range.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Enter valid input: "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✔️ Assign numbers to the user's choice.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="n"&gt;choice_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'Stone'&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="n"&gt;choice_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'Paper'&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="n"&gt;choice_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'Scissor'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✔️ Let the computer select its choice and then assign numbers to the computer's choice.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="n"&gt;computer_choice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  

&lt;span class="c1"&gt;# Assigning numbers to the computer's choices
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;computer_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="n"&gt;computer_choicehoice_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'Stone'&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;computer_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="n"&gt;computer_choicehoice_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'Paper'&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="n"&gt;computer_choicehoice_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'Scissor'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✔️ Write the main logic of the game.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;computer_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt;
      &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;computer_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;)):&lt;/span&gt; 
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Paper wins !!! &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Paper"&lt;/span&gt;

    &lt;span class="k"&gt;elif&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;computer_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;computer_choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt; 
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Stone wins !!! &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Stone"&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Scissor wins !!!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Scissor"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✔️ Declare the result.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;choice_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;YOU WIN !!!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;COMPUTER WINS !!!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✔️ Ask a replay question and also code the condition to break the infinite while loop.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Do you want to play again? (y/n)"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
    &lt;span class="n"&gt;ans&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; 

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;ans&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;'n'&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;ans&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;'N'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="k"&gt;break&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  🎉 That's it! Isn't it easy? Now you have your own game to play!
&lt;/h3&gt;

&lt;p&gt;You can also refer my GitHub repo:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/divyakelaskar"&gt;
        divyakelaskar
      &lt;/a&gt; / &lt;a href="https://github.com/divyakelaskar/Stone-Paper-Scissor-Game"&gt;
        Stone-Paper-Scissor-Game
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A  game in python.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Stone-Paper-Scissor-Game&lt;/h1&gt;
&lt;p&gt;A simple Stone Paper Scissor game in Python 3.&lt;/p&gt;
&lt;h2&gt;
Try it out on GitPod !&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://gitpod.io/#https://github.com/divyakelaskar/Stone-Paper-Scissor-Game/blob/master/stone%20paper%20scissor%20game.py" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/76e60919474807718793857d8eb615e7a50b18b04050577e5a35c19421f260a3/68747470733a2f2f676974706f642e696f2f627574746f6e2f6f70656e2d696e2d676974706f642e737667" alt="Open in Gitpod"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/divyakelaskar/Stone-Paper-Scissor-Game"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



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