<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Dp on Python Exercises</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/categories/dp/</link><description>Recent content in Dp on Python Exercises</description><generator>Hugo</generator><language>fa-ir</language><lastBuildDate>Sat, 06 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://amirmahdikahdouii.github.io/Python-Exercises/categories/dp/index.xml" rel="self" type="application/rss+xml"/><item><title>دنباله فیبوناچی بازگشتی</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/problems/042-fibonacci-recursive-sequence/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://amirmahdikahdouii.github.io/Python-Exercises/problems/042-fibonacci-recursive-sequence/</guid><description>&lt;p&gt;&lt;strong&gt;#042&lt;/strong&gt; · &lt;strong&gt;Fibonacci Recursive Sequence&lt;/strong&gt; · &lt;code&gt;dp&lt;/code&gt; · &lt;code&gt;easy&lt;/code&gt; · &lt;code&gt;python&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Amirmahdikahdouii/Python-Exercises/blob/master/problems/042-fibonacci-recursive-sequence/solution.py"&gt;مشاهده راه‌حل در GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="factorial-with-recursive-function"&gt;Factorial with recursive function&lt;/h1&gt;
&lt;p&gt;برنامه ای بنویسید که با استفاده از توابع بازگشتی، فاکتوریل را تا مقدار داده شده خروجی دهد.&lt;/p&gt;
&lt;h3 id="example"&gt;Example:&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Input1:&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;7
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Output1:&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;0 1 1 2 3 5 8 13
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>مسئله کوله‌پشتی</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/problems/054-knapsack-max-value/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://amirmahdikahdouii.github.io/Python-Exercises/problems/054-knapsack-max-value/</guid><description>&lt;p&gt;&lt;strong&gt;#054&lt;/strong&gt; · &lt;strong&gt;Knapsack Max Value&lt;/strong&gt; · &lt;code&gt;dp&lt;/code&gt; · &lt;code&gt;medium&lt;/code&gt; · &lt;code&gt;python&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Amirmahdikahdouii/Python-Exercises/blob/master/problems/054-knapsack-max-value/solution.py"&gt;مشاهده راه‌حل در GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="مسئله-کوله-پشتی"&gt;مسئله کوله پشتی&lt;/h1&gt;
&lt;p&gt;برنامه ای بنویسید که یک ماتریس n * 2 را از ورودی دریافت کند که ستون اول برابر با وزن اشیا و ستون دوم برابر با ارزش آنها خواهد بود. بعد با توجه به وزن کوله که داده خواهد شد، بیشترین تعداد آیتمی که میتوان در کوله جای داد تا ارزش کلی آنها بیشترین مقدار باشد را خروجی دهید.&lt;/p&gt;</description></item></channel></rss>