<?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: Manan mangla</title>
    <description>The latest articles on DEV Community by Manan mangla (@manan_mangla_ade63f658152).</description>
    <link>https://dev.to/manan_mangla_ade63f658152</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4241682%2Fb1a602b2-4a2e-4964-a8da-0442b0a48660.png</url>
      <title>DEV Community: Manan mangla</title>
      <link>https://dev.to/manan_mangla_ade63f658152</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/manan_mangla_ade63f658152"/>
    <language>en</language>
    <item>
      <title>python-quiz game</title>
      <dc:creator>Manan mangla</dc:creator>
      <pubDate>Sun, 15 Nov 2026 18:31:57 +0000</pubDate>
      <link>https://dev.to/manan_mangla_ade63f658152/python-quiz-game-2k5j</link>
      <guid>https://dev.to/manan_mangla_ade63f658152/python-quiz-game-2k5j</guid>
      <description>&lt;p&gt;&lt;strong&gt;Title:&lt;/strong&gt; Building a Sudden-Death Quiz CLI Game in Python (And What I Learned About Dictionary Lookups)&lt;/p&gt;

&lt;p&gt;Today, as part of my daily 20–30 minute coding streak, I built a terminal-based &lt;strong&gt;Sudden-Death Quiz Game&lt;/strong&gt; in Python. One wrong answer, and the loop breaks immediately.&lt;/p&gt;

&lt;h3&gt;
  
  
  🛠️ How It Works Under the Hood
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Structure:&lt;/strong&gt; I stored 5 questions (covering tech, gaming, and cinema) and their answers in two separate dictionaries mapped by keys &lt;code&gt;1&lt;/code&gt; to &lt;code&gt;5&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UX Timing:&lt;/strong&gt; Instead of delaying before showing the question, I placed &lt;code&gt;print(quiz[i])&lt;/code&gt; above &lt;code&gt;time.sleep(2)&lt;/code&gt; so the player reads the prompt while the timer builds tension.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean Matching:&lt;/strong&gt; Applied &lt;code&gt;.lower().strip()&lt;/code&gt; on both ends so capitalization doesn't ruin a right answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🐛 Bugs I Caught Along the Way
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dictionary Slicing:&lt;/strong&gt; I initially tried slicing the dictionary (&lt;code&gt;quiz[1:1:5]&lt;/code&gt;) before realizing dictionaries require direct key indexing (&lt;code&gt;quiz[i]&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loop Scope:&lt;/strong&gt; My first draft placed &lt;code&gt;input()&lt;/code&gt; outside the &lt;code&gt;for&lt;/code&gt; loop, meaning it only asked one question instead of iterating through all five.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  ⚖️ Honest Progress Check (75/25 Split)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;75% Me:&lt;/strong&gt; Creating the questions, writing every line in VS Code, designing the sudden-death &lt;code&gt;break&lt;/code&gt; rule, and fixing the timer UX.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;25% AI Mentorship:&lt;/strong&gt; Getting hints on why dictionary slicing threw an error and spotting indentation placement—no copy-pasting solutions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is one small CLI project you built when learning Python dictionaries? Drop your thoughts below! 👇&lt;/p&gt;

&lt;p&gt;here is the link to the code please watch it and review it thank you ❤️&lt;br&gt;
&lt;a href="https://github.com/MANAN-FULLSTACK-DEV/PYTHON-BASICS-PRACTICE-AND-LEARNING/blob/main/quiz%20game.py" rel="noopener noreferrer"&gt;https://github.com/MANAN-FULLSTACK-DEV/PYTHON-BASICS-PRACTICE-AND-LEARNING/blob/main/quiz%20game.py&lt;/a&gt;&lt;strong&gt;__&lt;/strong&gt;&lt;/p&gt;

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