<?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>Arrays on Python Exercises</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/categories/arrays/</link><description>Recent content in Arrays 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/arrays/index.xml" rel="self" type="application/rss+xml"/><item><title>آمار چهار عدد</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/problems/016-four-number-statistics/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://amirmahdikahdouii.github.io/Python-Exercises/problems/016-four-number-statistics/</guid><description>&lt;p&gt;&lt;strong&gt;#016&lt;/strong&gt; · &lt;strong&gt;Four Number Statistics&lt;/strong&gt; · &lt;code&gt;arrays&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://quera.org/problemset/3403/"&gt;منبع سوال&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Amirmahdikahdouii/Python-Exercises/blob/master/problems/016-four-number-statistics/solution.py"&gt;مشاهده راه‌حل در GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;برنامه‌ای بنویسید که ۴ عدد از ورودی بگیرد و حاصل جمع، میانگین، حاصل ضرب، عضو بیشینه و عضو کمینه را در خروجی چاپ کند.&lt;/p&gt;
&lt;h1 id="ورودی"&gt;ورودی:&lt;/h1&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;
در هر یک از چهار خط ورودی یک عدد صحیح آمده است که قدر مطلق هیچ یک از آن ها از ۱۰۰۰ بیشتر نیست.
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id="خروجی"&gt;خروجی:&lt;/h1&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;
خروجی پنج خط است که به ترتیب مجموع اعداد، میانگین، ضرب، بیشینه و کمینه‌ی باید در آن‌ها چاپ شوند.
نحوه‌ی خروجی دادن به این صورت است که مانند نمونه‌ی پایین باید اول نام خروجی مورد نظر
سپس یک فاصله، دونقطه، فاصله‌ی مجدد و در آخر عدد مورد نظر با دقیقا ۶ رقم اعشار چاپ شود.
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="ورودی-نمونه"&gt;ورودی نمونه:&lt;/h3&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;
1
2
3
4
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="خروجی-نمونه"&gt;خروجی نمونه:&lt;/h3&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;
Sum : 10.000000
Average : 2.500000
Product : 24.000000
MAX : 4.000000
MIN : 1.000000
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href="https://quera.org/problemset/3403/"&gt;لینک سوال&lt;/a&gt;&lt;/p&gt;</description></item><item><title>ادغام زیگزاگ دو لیست</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/problems/077-zigzag-merge-lists/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://amirmahdikahdouii.github.io/Python-Exercises/problems/077-zigzag-merge-lists/</guid><description>&lt;p&gt;&lt;strong&gt;#077&lt;/strong&gt; · &lt;strong&gt;Zigzag Merge Lists&lt;/strong&gt; · &lt;code&gt;arrays&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/077-zigzag-merge-lists/solution.py"&gt;مشاهده راه‌حل در GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="zigzag-generator"&gt;ZigZag generator&lt;/h1&gt;
&lt;p&gt;برنامه ای بنویسید که دو لیست از اعداد را دریافت کند و آیتم های آنها را یکی یکی در کنار هم قرار داده و خروجی دهد.&lt;/p&gt;
&lt;p&gt;اگر یک لیست آیتم های بیشتری از دیگری داشت، باید بقیه اعضای باقی مانده را در انتهای لیست قرار دهد.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ورودی:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;ورودی شامل دو خط میباشد:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;در خط اول ورودی به شما لیست اعداد اول داده میشود&lt;/li&gt;
&lt;li&gt;در خط دوم ورودی لیست اعداد دوم داده میشود&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;نکته:&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>اعداد رد شده</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/problems/039-find-missing-numbers/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://amirmahdikahdouii.github.io/Python-Exercises/problems/039-find-missing-numbers/</guid><description>&lt;p&gt;&lt;strong&gt;#039&lt;/strong&gt; · &lt;strong&gt;Find Missing Numbers&lt;/strong&gt; · &lt;code&gt;arrays&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/039-find-missing-numbers/solution.py"&gt;مشاهده راه‌حل در GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="passed-numbers"&gt;Passed Numbers&lt;/h1&gt;
&lt;p&gt;برنامه ای بنویسید که اعداد رد شده را مشخص و در لیستی خروجی دهد.&lt;/p&gt;
&lt;h2 id="input"&gt;Input:&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;numbers = [1, 3, 5, 6, 7, 8, 9, 10, 13, 14, 16, 17, 20, 21, 25]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="output"&gt;Output:&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[2, 4, 11, 12, 15, 18, 19, 22, 23, 24]
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>الگوریتم Top-One</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/problems/069-most-frequent-elements/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://amirmahdikahdouii.github.io/Python-Exercises/problems/069-most-frequent-elements/</guid><description>&lt;p&gt;&lt;strong&gt;#069&lt;/strong&gt; · &lt;strong&gt;Most Frequent Elements&lt;/strong&gt; · &lt;code&gt;arrays&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/069-most-frequent-elements/solution.py"&gt;مشاهده راه‌حل در GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="top-one-algorithm"&gt;Top-One Algorithm&lt;/h1&gt;
&lt;p&gt;شما باید برنامه ای بنویسید که یک سری از اعداد دریافت کند و اعدادی که بیشترین تکرار رو توی اون سری داشتند به ما برگردونند.&lt;/p&gt;
&lt;p&gt;در خط اول به شما یک سری از اعداد داده میشود که با &amp;ldquo;,&amp;rdquo; از هم جدا شده اند.&lt;/p&gt;
&lt;p&gt;در تنها خط خروجی یک لیست از اعداد با بیشترین تکرار را چاپ کنید.&lt;/p&gt;</description></item><item><title>الگوریتم محدودسازی</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/problems/068-filter-by-limit-range/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://amirmahdikahdouii.github.io/Python-Exercises/problems/068-filter-by-limit-range/</guid><description>&lt;p&gt;&lt;strong&gt;#068&lt;/strong&gt; · &lt;strong&gt;Filter By Limit Range&lt;/strong&gt; · &lt;code&gt;arrays&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/068-filter-by-limit-range/solution.py"&gt;مشاهده راه‌حل در GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="limit-algorithm"&gt;Limit Algorithm&lt;/h1&gt;
&lt;p&gt;توی این مسئله به شما در سه خط، دیتای ورودی داده میشود.&lt;/p&gt;
&lt;p&gt;در خط اول به شما دنباله ای از اعداد داده میشود که با &amp;ldquo;,&amp;rdquo; از هم جدا شده اند.&lt;/p&gt;
&lt;p&gt;در خط دوم مقدار حداقل به شما داده میشود کف و حداقل مقدار اعداد را مشخص میکند یعنی اعداد شما باید بزرگتر یا مساوی این مقدار باشند.&lt;/p&gt;</description></item><item><title>لیست متقارن</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/problems/041-symmetric-list-check/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://amirmahdikahdouii.github.io/Python-Exercises/problems/041-symmetric-list-check/</guid><description>&lt;p&gt;&lt;strong&gt;#041&lt;/strong&gt; · &lt;strong&gt;Symmetric List Check&lt;/strong&gt; · &lt;code&gt;arrays&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/041-symmetric-list-check/solution.py"&gt;مشاهده راه‌حل در GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="symmetric-list"&gt;Symmetric List&lt;/h1&gt;
&lt;p&gt;برنامه ای بنویسید که لیستی از پارامترها را دریافت کند و چک کند آیا پارامترهای ارسالی symmetric هست یا خیر.
symmetric به لیستی میگویند که از دو طرف با هم بر ابر باشند.&lt;/p&gt;
&lt;h3 id="examples"&gt;Examples:&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Input1:&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[1,2,3,4,5,4,3,2,1]
&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;True
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Input2:&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[1,2,3,4,5,6,7]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Output2:&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;False
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>ماتریس به دودویی</title><link>https://amirmahdikahdouii.github.io/Python-Exercises/problems/052-matrix-binary-conversion/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate><guid>https://amirmahdikahdouii.github.io/Python-Exercises/problems/052-matrix-binary-conversion/</guid><description>&lt;p&gt;&lt;strong&gt;#052&lt;/strong&gt; · &lt;strong&gt;Matrix Binary Conversion&lt;/strong&gt; · &lt;code&gt;arrays&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/052-matrix-binary-conversion/solution.py"&gt;مشاهده راه‌حل در GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h1 id="کار-با-ماتریس-و-اعداد-دودویی"&gt;کار با ماتریس و اعداد دودویی&lt;/h1&gt;
&lt;p&gt;برنامه ای بنویسید که یک ماتریس دلخواه از اعداد طبیعی را بخواند و آن را تبدیل به یک ماتریس دودویی کند.&lt;/p&gt;
&lt;h2 id="example"&gt;Example:&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Input:&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Please Enter Records Count: 2
Please Enter Sells Count: 2
Sell Number: 2
Sell Number: 10
---------------
Sell Number: 20
Sell Number: 30
---------------
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[[2, 10], [20, 30]]
[[&amp;#39;10&amp;#39;, &amp;#39;1010&amp;#39;], [&amp;#39;10100&amp;#39;, &amp;#39;11110&amp;#39;]]
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>