<?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: TeddyRyan</title>
    <description>The latest articles on DEV Community by TeddyRyan (@teddyryan).</description>
    <link>https://dev.to/teddyryan</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%2F843723%2F25a42d50-1882-47db-9501-d2196c212b82.png</url>
      <title>DEV Community: TeddyRyan</title>
      <link>https://dev.to/teddyryan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/teddyryan"/>
    <language>en</language>
    <item>
      <title>My First Python Project (Blackjack)</title>
      <dc:creator>TeddyRyan</dc:creator>
      <pubDate>Thu, 07 Apr 2022 16:25:39 +0000</pubDate>
      <link>https://dev.to/teddyryan/my-first-python-project-blackjack-4fao</link>
      <guid>https://dev.to/teddyryan/my-first-python-project-blackjack-4fao</guid>
      <description>&lt;p&gt;Hey there.&lt;/p&gt;

&lt;p&gt;I'm a newly minted lawyer who is already looking for something new. I've dabbled with coding a few times in the past. I even had professors in the past suggest that I switch my major to computer programming, but I didn't listen. But now I've decided to seriously pursue programming on my own time via Codecademy. This was the final project for the CS 101 course. My first "real" project took me a few hours and a lot of googling. Here it is!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6zt5ao1r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lw5j1vnottx2tic5k5ym.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6zt5ao1r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lw5j1vnottx2tic5k5ym.gif" alt="Image description" width="480" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Code: &lt;a href="https://github.com/TeddyRyan/Blackjack"&gt;https://github.com/TeddyRyan/Blackjack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I used &lt;strong&gt;init&lt;/strong&gt; for the individual card values, values, and suits. My name loops through 2 lists (suits and cards) and appends them to the deck list. It also uses the cards to navigates the card value dictionary. &lt;/p&gt;

&lt;p&gt;Once the deck is generated the game begins.&lt;/p&gt;

&lt;p&gt;The blackjack method starts by creating empty lists for the player and dealer hands, zeroing the participant scores, and stating that neither actor has a blackjack. The cards are dealt and it checks if anyone has a blackjack. If the player does it moves on to the dealer. If the dealer has a blackjack it waits to reveal it until the player has played. I also took care to adjust the value of an ace should it cause a bust. The player loops through the game hitting until he stands. If he busts the game will end on the spot. &lt;/p&gt;

&lt;p&gt;I read that some casinos allow the dealer to chase the player even if the dealer has a 17 or more. So if the player has 20 the dealer will hit on 17 to try and get 20 or 21.&lt;/p&gt;

&lt;p&gt;The end of the program makes a number of comparisons between the cards. If one player has a blackjack and the other does not, that player wins. If neither has a blackjack then the player with a greater score (that is still &amp;lt;= 21) wins!&lt;/p&gt;

&lt;p&gt;If you have any critiques on it I would love to hear them!&lt;/p&gt;

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