<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dhirendra Bohara on Medium]]></title>
        <description><![CDATA[Stories by Dhirendra Bohara on Medium]]></description>
        <link>https://medium.com/@dhirendrabohara37?source=rss-ebf54bdfda29------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_nHN4E4b8WSdN30GP5JBNQ.png</url>
            <title>Stories by Dhirendra Bohara on Medium</title>
            <link>https://medium.com/@dhirendrabohara37?source=rss-ebf54bdfda29------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 18:57:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dhirendrabohara37/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is Function in Python?]]></title>
            <link>https://medium.com/@dhirendrabohara37/what-is-function-in-python-62b66a40dfde?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/62b66a40dfde</guid>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Tue, 03 Dec 2024 16:32:36 GMT</pubDate>
            <atom:updated>2024-12-03T16:39:18.101Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GU1V20Mw33MpVSP3ppBHIg.jpeg" /></figure><h3>In Python, a <strong>function</strong> is a block of reusable code that performs a specific task.</h3><h3>Defining a Function</h3><p>You define a function in Python using the def keyword:</p><pre>def function_name(parameters): # Parameters is a not a value but value store</pre><pre>&quot;&quot;&quot;</pre><pre>Docstring (optional): Explains what the function does.</pre><pre>&quot;&quot;&quot;</pre><pre>return result  # Optional: Returns a value to the caller</pre><h3>Example of a Simple Function</h3><pre>def greet(name):</pre><pre>&quot;&quot;&quot;Greet the user by their name.&quot;&quot;&quot;</pre><pre>return f&quot;Hello, {name}!&quot;</pre><p>print(greet(&quot;Alice&quot;)) # Output: Hello, Alice!</p><h3>Key Features of Functions</h3><ol><li><strong>Parameters and Arguments</strong>:</li></ol><ul><li><strong>Parameters</strong> are placeholders defined in the function signature.</li><li><strong>Arguments</strong> are actual values passed to the function.</li></ul><pre>def add(a, b):  # &#39;a&#39; and &#39;b&#39; are parameters</pre><pre>return a + b</pre><pre>print(add(5, 3))  # 5 and 3 are Arguments Is a value of parameter which is stay of function ex def space and function name ()inside of Parenthes.  </pre><ol><li><strong>Default Parameters</strong>: You can provide default values for parameters.</li></ol><pre>python</pre><pre>Copy code</pre><pre>def greet(name=&quot;Guest&quot;):</pre><pre>return f&quot;Hello, {name}!&quot;</pre><pre>print(greet())         # Output: Hello, Guest!</pre><p>print(greet(&quot;Alice&quot;)) # Output: Hello, Alice!</p><ol><li><strong>Return Values</strong>: Functions can return values using the return statement.</li></ol><pre>def square(x):</pre><pre>return x ** 2</pre><pre>result = square(4)  # result = 16</pre><ol><li><strong>Keyword Arguments</strong>: Arguments can be passed as key=value pairs.</li></ol><pre>def introduce(name, age):</pre><pre>return f&quot;My name is {name} and I&#39;m {age} years old.&quot;</pre><pre>print(introduce(age=25, name=&quot;Alice&quot;))  # Order doesn&#39;t matter</pre><h3>Types of Functions</h3><p>1. <strong>Built-in Functions</strong>: Python includes many built-in functions, like:</p><ul><li>print()</li><li>len()</li><li>type()</li></ul><p>2. <strong>User-defined Functions</strong>: Functions you create using the def keyword.</p><p>3. <strong>Lambda Functions (Anonymous Functions)</strong>: A one-line function created using the lambda keyword.</p><pre>square = lambda x: x ** 2</pre><pre>print(square(5))  # Output: 25</pre><ol><li><strong>Higher-order Functions</strong>: Functions that take other functions as arguments, such as:</li></ol><ul><li>map()</li><li>filter()</li><li>reduce()</li></ul><p>other ex.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*XTMTrH9bBa-S9-oaFyH_7g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*f_4mE2XYCL_dscI9DlDovw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*rzsJ-I6JKwti23FHmFMntQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MELNxtWqQEJYjMnPL9mRIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YEEQYOIpmPgNS2fbUtBPpw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ud59m60_8jbCU_FV_udw7A.png" /></figure><p>You define a function in Python using the def keyword:</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62b66a40dfde" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Jupyter Notebook? ]]></title>
            <link>https://medium.com/@dhirendrabohara37/what-is-jupyter-notebook-2ada9beb5b45?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ada9beb5b45</guid>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Mon, 02 Dec 2024 12:43:58 GMT</pubDate>
            <atom:updated>2024-12-02T12:43:58.329Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A2BXilR689e20DpbAMj5yQ.jpeg" /></figure><p>Jupyter Notebook is an open-source web application that lets you create and share documents containing live code, visualizations, equations, and text. It’s popular in data science, machine learning, and education for its interactivity and ease of use.</p><p><strong>How to Install and Use Jupyter Notebook on Windows</strong></p><h3>Step 1: Install Jupyter Notebook</h3><ol><li>Open Command Prompt 💻.</li><li>Run:</li></ol><pre>pip install jupyter</pre><p>🥳 <strong>Congrats!</strong> Jupyter Notebook is now installed!</p><h3>Step 2: Launch Jupyter Notebook</h3><ol><li>Start it with:</li><li>It will open in your default web browser 🌐, displaying your system’s folders.</li></ol><h3>Step 3: Create a New Notebook</h3><ol><li>Click <strong>New</strong> ➕ in the top-right and select <strong>Python 3</strong> (or your Python version).</li><li>A new .ipynb file will open, ready for your code.</li></ol><h3>Step 4: Write and Run Code</h3><ol><li>Type this in the first cell:</li></ol><pre>print&quot;Hello, Jupyter Notebook!&quot;)</pre><ol><li>Press <strong>Shift + Enter</strong> to run it. Your output will appear below ✨.</li></ol><h3>Conclusion</h3><p>You’re ready to explore the world of data science and machine learning with Jupyter Notebook! 🚀 Share your work on GitHub, LinkedIn, or join communities to showcase your projects.</p><p>Keep learning and coding — happy coding! 💻✨</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ada9beb5b45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SET IN PYTHON]]></title>
            <link>https://medium.com/@dhirendrabohara37/set-in-python-4db43362c421?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/4db43362c421</guid>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Sun, 01 Dec 2024 14:58:56 GMT</pubDate>
            <atom:updated>2024-12-01T15:01:15.954Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B0eTcQxzYWj3iFvn4_DcvQ.jpeg" /></figure><p><strong>A string is a sequence of characters enclosed in quotes (single ‘, double “, or triple ‘’’/”””).</strong></p><p><strong><em>Strings in python are surrounded by either single quotation marks, or double quotation marks.</em></strong></p><p>‘hello’ is the same as “hello”.</p><p><strong><em>You can display a string literal with the print() function:</em></strong></p><p>print(“It’s alright”)<br> print(“He is called ‘Johnny’”)<br> print(‘He is called “Johnny”’)</p><p><strong><em>Assigning a string to a variable is done with the variable name followed by an equal sign and the string:</em></strong></p><p><strong><em>Ex.</em></strong></p><p>a = “Hello”<br> print(a)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*i0M0-GKKAm6jdWjqt7dS7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*EnM_EqU1-9Qi-u-KLCly6w.png" /></figure><h3><strong>Mathematical Set Operations</strong></h3><p>A = {1, 2, 3}</p><p>B = {3, 4, 5}</p><p># Union</p><p>print(A | B) # Output: {1, 2, 3, 4, 5}</p><p># Intersection</p><p>print(A &amp; B) # Output: {3}</p><p># Difference</p><p>print(A — B) # Output: {1, 2}</p><p># Symmetric Difference</p><p>print(A ^ B) # Output: {1, 2, 4, 5}</p><p><strong>Applications of Sets</strong></p><ol><li><strong>Removing Duplicates</strong>:</li></ol><p>nums = [1, 2, 2, 3, 4, 4]</p><p>unique_nums = set(nums)</p><p>print(unique_nums) # Output: {1, 2, 3, 4}</p><ol><li><strong>Membership Testing</strong>:</li></ol><p>if “apple” in fruit_set:</p><p>print(“Apple is in the set”)</p><ol><li><strong>Mathematical Computations</strong>: Useful for union, intersection, and other set-based logic.</li></ol><h3>Short test ex.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*00HzBkX8N965iGeTeH5MEQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4db43362c421" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TUPLE IN PYTHON]]></title>
            <link>https://medium.com/@dhirendrabohara37/tuple-41aa3e907851?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/41aa3e907851</guid>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Sun, 01 Dec 2024 12:08:01 GMT</pubDate>
            <atom:updated>2024-12-01T15:03:05.643Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JO-ja70R1lVROJmY7r_GIg.jpeg" /></figure><h3><strong><em>A tuple is an immutable (unchangeable) sequence of items, often used to group related data. Tuples are ordered and allow duplicate values.</em></strong></h3><h3>next answer.</h3><h3>A <strong>tuple</strong> is a type of data structure in programming that holds a collection of items. It’s similar to a list, but there’s one big difference: <strong>you can’t change the items in a tuple after you create it</strong>.</h3><h3><strong>Basic Features</strong></h3><p><strong>1.</strong> <strong>Immutable: Cannot be modified after creation.</strong></p><p><strong>2.</strong> <strong>Ordered: Items have a fixed order.</strong></p><p><strong>3.</strong> <strong>Allow Duplicates: Items can repeat.</strong></p><p><strong>Creating Tuples</strong></p><h3><strong># Empty tuple</strong></h3><p><strong>t1 = ()</strong></p><h3><strong># Single-element tuple (comma is necessary)</strong></h3><p><strong>t2 = (42,)</strong></p><h3><strong># Multi-element tuple</strong></h3><p><strong>t3 = (1, 2, 3)</strong></p><h3><strong># Tuple without parentheses (packing)</strong></h3><p><strong>t4 = 1, 2, 3</strong></p><h3><strong># Nested tuple</strong></h3><p><strong>t5 = (1, (2, 3), 4)</strong></p><h3><strong># Unpacking tuple</strong></h3><p><strong>a, b, c = (5, 6, 7)</strong></p><h3><strong>Accessing Elements</strong></h3><p><strong>t = (10, 20, 30, 40)</strong></p><h3><strong># Indexing</strong></h3><p><strong>print(t[1]) # Output: 20</strong></p><h3><strong># Slicing</strong></h3><p><strong>print(t[1:3]) # Output: (20, 30)</strong></p><h3><strong># Iterating</strong></h3><p><strong>for item in t:</strong></p><p><strong>print(item)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*V9e7FfefJDFCgGjhzQbiPA.png" /></figure><h3><strong>Key Points:</strong></h3><p>1.<strong>Ordered</strong>: The items stay in the same order.</p><p>2.<strong>Immutable</strong>: You can’t add, remove, or change items.</p><p>3.<strong>Can store different types</strong>: A tuple can hold numbers, strings, or even other tuples.</p><p>python</p><p>mixed_tuple = (1, “hello”, 3.14)</p><h3><strong>Tuples are useful when:</strong></h3><p>•You want to ensure that the data stays constant.</p><p>•You need a lightweight structure to group related items together.</p><p>For<strong><em> example</em></strong>, storing the coordinates of a point:</p><p><strong><em>python</em></strong></p><p>coordinates = (10, 20)</p><p>In short, think of a tuple as a <strong>fixed box</strong> where you can store items, but you can’t open it to rearrange or replace things inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*CPlTm4t4eRXUo9pg9KPKpw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41aa3e907851" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[STRING IN PYTHON]]></title>
            <link>https://medium.com/@dhirendrabohara37/strings-97b0f687a885?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/97b0f687a885</guid>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Sun, 01 Dec 2024 11:48:15 GMT</pubDate>
            <atom:updated>2024-12-01T15:05:10.191Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*mOYLdUIYV06TLl5rtVdrPQ.png" /></figure><p><strong>A string is a sequence of characters enclosed in quotes (single ‘, double “, or triple ‘’’/”””).</strong></p><p><em>Strings in python are surrounded by either single quotation marks, or double quotation marks.</em></p><p><em>‘hello’ is the same as “hello”.</em></p><p><strong><em>You can display a string literal with the print() function:</em></strong></p><p>print(“It’s alright”)<br> print(“He is called ‘Johnny’”)<br> print(‘He is called “Johnny”’)</p><p><em>Assigning a string to a variable is done with the variable name followed by an equal sign and the string:</em></p><h3>Ex.</h3><p>a = “Hello”<br> print(a)</p><h3>How to Create Strings?</h3><pre>single_quote = &#39;Hello&#39;<br>double_quote = &quot;World&quot;<br>multi_line = &#39;&#39;&#39;This<br>is<br>a multi-line string.&#39;&#39;&#39;</pre><h3>Common String Operations</h3><p><strong>OperationExampleResult</strong>Access characters[0] (if s = &quot;Hello&quot;)&#39;H&#39;Slice strings[1:4]&#39;ell&#39;Length of stringlen(s)5Concatenate strings&quot;Hello &quot; + &quot;World&quot;&#39;Hello World&#39;Repeat string&quot;Hi&quot; * 3&#39;HiHiHi&#39;</p><h3>String Methods (Commonly Used)</h3><p><strong>MethodDescriptionExample</strong>s.lower()Converts to lowercase&quot;HELLO&quot;.lower() → &#39;hello&#39;s.upper()Converts to uppercase&quot;hello&quot;.upper() → &#39;HELLO&#39;s.strip()Removes leading/trailing spaces&quot; hello &quot;.strip() → &#39;hello&#39;s.replace(a, b)Replaces a with b&quot;apple&quot;.replace(&quot;p&quot;, &quot;b&quot;) → &#39;abble&#39;s.split()Splits string into a list&quot;a,b,c&quot;.split(&quot;,&quot;) → [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]&quot; &quot;.join(list)Joins list into a string&quot;,&quot;.join([&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]) → &#39;a,b,c&#39;s.find(sub)Finds substring index&quot;hello&quot;.find(&quot;e&quot;) → 1</p><h3>Check String Content</h3><p><strong>Check ExampleResult</strong>Starts with&quot;hello&quot;.startswith(&quot;he&quot;)TrueEnds with&quot;hello&quot;.endswith(&quot;lo&quot;)TrueIs alphabetic&quot;abc&quot;.isalpha()TrueIs numeric&quot;123&quot;.isdigit()True</p><h3>Formatting Strings</h3><pre># Using f-strings (recommended)<br>name = &quot;Alice&quot;<br>age = 25<br>print(f&quot;My name is {name} and I am {age} years old.&quot;)  # Output: My name is Alice and I am 25 years old.</pre><pre># Using format()<br>print(&quot;My name is {} and I am {} years old.&quot;.format(name, age))</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97b0f687a885" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Dictionary in Python]]></title>
            <link>https://medium.com/@dhirendrabohara37/what-is-dictionary-in-python-d1fb7b850676?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1fb7b850676</guid>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Sat, 30 Nov 2024 05:08:00 GMT</pubDate>
            <atom:updated>2024-12-01T16:05:10.296Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*eJ9RgLwxt3rlEVxbkh7brQ.png" /></figure><blockquote><strong>A dictionary is a collection of key-value pairs.</strong></blockquote><blockquote><strong>It’s like a real-life dictionary: you have words (keys) and their meanings (values).</strong></blockquote><blockquote><strong>In Python, dictionaries are written with curly braces {}.</strong></blockquote><h3>How to Create a Dictionary?</h3><p><strong><em>Here’s how you can create a dictionary:</em></strong></p><pre># Example of a simple dictionary<br>my_dict = {<br>    &quot;name&quot;: &quot;John&quot;,<br>    &quot;age&quot;: 25,<br>    &quot;city&quot;: &quot;New York&quot;<br>}</pre><ul><li>&quot;name&quot;, &quot;age&quot;, and &quot;city&quot; are the <strong>keys</strong>.</li><li>&quot;John&quot;, 25, and &quot;New York&quot; are the <strong>values</strong>.</li></ul><h3>Accessing Values in a Dictionary</h3><p><strong>You can get the value for a specific key using square brackets</strong> <strong>[]:</strong></p><pre>print(my_dict[&quot;name&quot;])  # Output: John<br>print(my_dict[&quot;age&quot;])   # Output: 25</pre><h3>ex. basic for keys</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*kN19ffsI1I-kqLLqTazCig.png" /></figure><h3>Adding or Updating Items in a Dictionary</h3><p><strong><em>You can add a new key-value pair or update an existing one:</em></strong></p><pre>my_dict[&quot;country&quot;] = &quot;USA&quot;  # Adding a new key-value pair<br>my_dict[&quot;age&quot;] = 26         # Updating an existing key&#39;s value</pre><pre>print(my_dict)<br># Output: {&#39;name&#39;: &#39;John&#39;, &#39;age&#39;: 26, &#39;city&#39;: &#39;New York&#39;, &#39;country&#39;: &#39;USA&#39;</pre><h3>Removing Items from a Dictionary</h3><p><strong><em>You can remove a key-value pair using the </em></strong><strong><em>del keyword or </em></strong><strong><em>.pop() method:</em></strong></p><pre>del my_dict[&quot;city&quot;]  # Removes the key &#39;city&#39;<br>print(my_dict)       # Output: {&#39;name&#39;: &#39;John&#39;, &#39;age&#39;: 26, &#39;country&#39;: &#39;USA&#39;}</pre><pre># Using .pop()<br>removed_value = my_dict.pop(&quot;age&quot;)<br>print(removed_value)  # Output: 26<br>print(my_dict)        # Output: {&#39;name&#39;: &#39;John&#39;, &#39;country&#39;: &#39;USA&#39;}</pre><h3>Looping Through a Dictionary</h3><p><strong><em>You can loop through keys, values, or both:</em></strong></p><pre># Loop through keys<br>for key in my_dict:<br>    print(key)</pre><pre># Loop through values<br>for value in my_dict.values():<br>    print(value)</pre><pre># Loop through keys and values<br>for key, value in my_dict.items():<br>    print(key, &quot;:&quot;, value)</pre><h3>Checking if a Key Exists</h3><p>Use the in keyword:</p><pre>if &quot;name&quot; in my_dict:<br>    print(&quot;Key &#39;name&#39; exists!&quot;)</pre><h3>Useful Dictionary Methods</h3><p><strong><em>Here are some helpful methods:</em></strong></p><ul><li>my_dict.keys() – Returns all keys.</li><li>my_dict.values() – Returns all values.</li><li>my_dict.items() – Returns all key-value pairs as tuples.</li><li>my_dict.get(&quot;key&quot;) – Safely get the value of a key without an error if the key doesn’t exist.</li></ul><h3><strong>Example:</strong></h3><pre>print(my_dict.keys())    # Output: dict_keys([&#39;name&#39;, &#39;country&#39;])<br>print(my_dict.values())  # Output: dict_values([&#39;John&#39;, &#39;USA&#39;])<br>print(my_dict.items())   # Output: dict_items([(&#39;name&#39;, &#39;John&#39;), (&#39;country&#39;, &#39;USA&#39;)])</pre><h4><strong><em>Example:</em></strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*XqAdA9upXXXvtXA0jD_L7A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1fb7b850676" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prompt Engineering]]></title>
            <link>https://medium.com/@dhirendrabohara37/prompt-engineering-5c4a1de0ba28?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c4a1de0ba28</guid>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Fri, 29 Nov 2024 16:40:31 GMT</pubDate>
            <atom:updated>2024-11-29T16:40:31.252Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*gJcXCnekWDHIfuw5OjPDlg.png" /></figure><p><strong>Introduction: </strong><em>Prompt engineering means creating clear and specific instructions to help AI give better answers. It’s about using the right words and format to get the result you want.</em></p><p><strong>Scope of Prompt Engineering (Simplified):</strong></p><ol><li><strong>Improving AI Outputs</strong>:</li><li><strong>Boosting AI Performance</strong>:</li><li><strong>Teamwork Across Fields</strong>:</li><li><strong>Teaching and Training</strong>:</li><li><strong>Automation and Scaling</strong>:</li><li><strong>Advanced AI Features</strong>:</li><li><strong>Ethics and Safety</strong>:</li><li><strong>New Technologies</strong>:</li><li><strong>Skills Needed</strong>:</li><li><strong>Careers</strong>:</li><li><strong>Future</strong>:</li><li><strong>Prompt engineering</strong></li><li><strong>Practice Example</strong></li></ol><p><strong>1.Improving AI Outputs</strong>:</p><ul><li>Write specific prompts to make AI give accurate and meaningful results.</li><li>Use in many areas like customer service, education, coding, writing, healthcare, and research.</li></ul><p><strong>2.Boosting AI Performance</strong>:</p><ul><li>Saves time by reducing trial and error with clear prompts.</li><li>Fixes issues like biased or irrelevant responses.</li></ul><p><strong>3. Teamwork Across Fields</strong>:</p><ul><li>Combines AI with other expertise (e.g., medicine, law, coding).</li><li>Helps teams build smarter AI tools.</li></ul><p><strong>4. Teaching and Training</strong>:</p><ul><li>Helps people learn how to use AI effectively.</li><li>Creates better training data for improving AI systems.</li></ul><p><strong>5. Automation and Scaling</strong>:</p><ul><li>Automates tasks like summarizing, translating, or generating text.</li><li>Ensures reliable AI results for large-scale use.</li></ul><p><strong>6. Advanced AI Features</strong>:</p><ul><li>Links prompts for complex workflows.</li><li>Helps AI handle tasks it wasn’t directly trained for.</li></ul><p><strong>7. Ethics and Safety</strong>:</p><ul><li>Reduces harmful or biased outputs.</li><li>Ensures safe and ethical use of AI.</li></ul><p><strong>8. New Technologies</strong>:</p><ul><li>Improves AI by studying how prompts affect its performance.</li><li>Works with tools like APIs or plugins for better results.</li></ul><p><strong>9. Skills Needed</strong>:</p><ul><li>Understand how AI works and its limits.</li><li>Write clear and creative instructions.</li><li>Know basic programming (e.g., Python) for advanced tasks.</li></ul><p><strong>10. Careers</strong>:</p><ul><li>High demand for roles like prompt engineer, AI trainer, chatbot developer, and AI solutions expert.</li></ul><p><strong>11. Future</strong>:<br> As AI grows, prompt engineering will combine language, data, and AI knowledge to unlock new possibilities.</p><p><strong>12. Prompt engineering</strong> is the art of crafting clear, specific, and effective inputs (prompts) to get the best responses from AI tools like ChatGPT. Here’s an easy guide to help you handle it effectively:</p><p><strong>13. Practice Example</strong></p><p>I’m new to programming. Can you teach me about Python functions step-by-step with examples?</p><p>By practicing and refining your prompts, you’ll quickly become skilled at guiding AI for clear, useful, and relevant responses!</p><h3><strong>Prompt engineering</strong> is the art of crafting clear, specific, and effective inputs (prompts) to get the best responses from AI tools like ChatGPT. Here’s an easy guide to help you handle it effectively:</h3><p><strong>1.</strong> <strong>Be Clear and Specific</strong></p><ul><li>Use simple, straightforward language.</li><li>Include all necessary details to guide the AI.</li></ul><p><strong>Example:</strong> Instead of:</p><p>Tell me about history.<br> Use: Give me a brief overview of World War II with key events.</p><p><strong>2. Use Step-by-Step Instructions</strong></p><p>Guide the AI by breaking down your request into steps.</p><p><strong>Example:</strong></p><p>Explain how to bake a cake in simple steps for a beginner.</p><p><strong>3. Add Context</strong></p><p>Provide background or examples to make your prompt more specific.</p><p><strong>Example:</strong></p><p>I’m writing an email to my boss about missing a deadline. Can you help me draft a polite and professional message?</p><p><strong>4. Set a Role or Perspective</strong></p><p>Ask the AI to take on a specific role or tone.</p><p><strong>Example:</strong></p><p>Act as a travel guide and recommend activities for a day in Paris.</p><p><strong>5. Experiment with Formats</strong></p><ul><li>Ask for lists, tables, or structured outputs for better readability.</li></ul><p><strong>Example:</strong></p><p>Create a table comparing Python and Java for beginners.</p><p><strong>6. Ask Follow-Up Questions</strong></p><p>Don’t hesitate to refine the response by asking follow-ups.</p><p><strong>Example:</strong></p><p>Can you simplify that further? Can you explain this with examples?</p><p><strong>7. Use Constraints</strong></p><p>Limit the response to a specific word count, style, or format.</p><p><strong>Example:</strong></p><p>Summarize the benefits of exercise in 50 words.</p><p><strong>8. Test and Refine</strong></p><p>Experiment with different phrasings to improve the AI’s output.</p><p><strong>Example:</strong> Original Prompt:</p><p>Write a story.<br> Refined Prompt: Write a 200-word children’s story about a brave squirrel who saves the forest.</p><p><strong>9. Learn From Responses</strong></p><p>If the response isn’t what you want, analyze why and adjust the prompt.</p><p><strong>Example:</strong> If the output is too technical:</p><p>Explain this topic as if you’re teaching a 12-year-old.</p><p><strong>10. Practice Common Structures</strong></p><p>Here are some common templates for prompts:</p><ul><li><strong>Explain:</strong> “Explain [topic] in simple terms.”</li><li><strong>Compare:</strong> “Compare [A] and [B] in terms of [criteria].”</li><li><strong>Generate:</strong> “Write [type of content] about [topic].”</li><li><strong>Analyze:</strong> “What are the pros and cons of [something]?”</li><li><strong>Solve:</strong> “How can I [solve a problem]?”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*Wg6bftMJ8SJWcA2ugT1ORQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c4a1de0ba28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Sign and Symbol Programmer Must be Learn)]]></title>
            <link>https://medium.com/@dhirendrabohara37/sign-and-symbol-programmer-must-be-learn-81774bf15325?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/81774bf15325</guid>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Fri, 29 Nov 2024 10:41:56 GMT</pubDate>
            <atom:updated>2024-11-29T11:09:34.995Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Mathematical Operators , Comparison Operators, Logical Operators, Assignment Operators, Special Characters, Operators</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*nj3J6ClQVRy2smHDfCNz_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*-Bwmgt8rFinjIv4Hp6F-YA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*DeKI2IcBo7xYKj3dScSK9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*ku_u96ueLlui7Vl9ImqyFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*dnl4WXc8hD2du--NpXQ7yQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*5C2GKmDxovjXlH6J9dxyrg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*lyQrOtT9fVmSGp-dhqDY7w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81774bf15325" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Types in Python]]></title>
            <link>https://medium.com/@dhirendrabohara37/data-types-in-python-37553c22e391?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/37553c22e391</guid>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Fri, 29 Nov 2024 05:28:08 GMT</pubDate>
            <atom:updated>2024-11-29T10:13:49.548Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PtPo2B7OkpJ-hqDqWq0B3g.jpeg" /></figure><h4><em>In python, data types define what kind of value a variable can hold. Common data types are</em></h4><h3>1. Integer (int)</h3><p><em>Whole numbers, positive or negative, without decimals</em></p><p><strong><em>int</em></strong><em>: ex.</em><strong>num1 = 9</strong></p><h3>2. Float ex.num2 = 10.5</h3><p><em>Numbers having decimal point</em></p><p><strong><em>float:</em></strong><em> ex.</em><strong>num2 = 10.5</strong></p><h3>3. String (str) ex. text = “Hello Code Learner”</h3><p><em>Sequence of characters </em><strong><em>enclosed in quotes</em></strong></p><p><strong><em>str:</em></strong><em> Text or string ex. </em><strong>text = “Hello Code Learner”</strong></p><h3>4. List [ ]</h3><p><strong><em>list: </em></strong><em>Ordered, changeable, allows, duplicates. ex. </em><strong><em>names = [‘Sarit bohara’, “Suman Shrestha”, ‘Mani Thapa’, ‘Luxuri’]</em></strong></p><h3>5. Tuple(“ ”)</h3><p><strong><em>tuple:</em></strong><em> Ordered, unchangeable, allows duplicates ex. </em><strong>fruits = (“apple”, “banana”, “cherry”)</strong></p><p>A <strong>tuple</strong> is a type of data structure in programming that holds a collection of items. It’s similar to a list, but there’s one big difference: <strong>you can’t change the items in a tuple after you create it</strong>.</p><h3>Key Points:</h3><ol><li><strong>Ordered</strong>: The items stay in the same order.</li><li><strong>Immutable</strong>: You can’t add, remove, or change items.</li><li><strong>Can store different types</strong>: A tuple can hold numbers, strings, or even other tuples</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R8tXMVHNCuB8j0V-Z4BgDA.png" /></figure><p>tuple holds a name (string), age (integer), and a boolean (True/False).</p><h3>6. Set {}</h3><p><em>set: Unordered, unchangeable and no duplicates ex. </em><strong>fruitsset = {“apple”,”banana”,”carrot”}</strong></p><h3>7. Dictionary</h3><p><em>dict: key-value pairs ex.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*8EmkgjZPj-bE_b1VMm3u0g.png" /><figcaption><strong>print(type(student))</strong></figcaption></figure><p>result = … &lt;class ‘dict’&gt;</p><h3><em>Another Example</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*77m5YcQHLgXfZHRVEdqp9A.png" /></figure><h3>8. Boolean</h3><p><em>Represents one of two values which always shown either</em><strong><em>True or </em></strong><strong><em>False</em></strong>.</p><p><strong><em>bool: True or False values.</em></strong></p><h3>9. None:</h3><p><em>None: Represent no value or null.ex </em><strong>empty_value = None</strong></p><p>ex. filename none.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*8TXXhTXCbGl7IZnZ0as_ZA.png" /></figure><h3>All Collection Example:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QW4RtjOT4bbG12uuv_uleg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37553c22e391" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Type in python.]]></title>
            <link>https://medium.com/@dhirendrabohara37/data-type-in-python-0bab1253ce9d?source=rss-ebf54bdfda29------2</link>
            <guid isPermaLink="false">https://medium.com/p/0bab1253ce9d</guid>
            <dc:creator><![CDATA[Dhirendra Bohara]]></dc:creator>
            <pubDate>Thu, 28 Nov 2024 20:07:14 GMT</pubDate>
            <atom:updated>2024-11-28T20:07:14.426Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong><em>Lists and Tuples</em></strong></h3><h3><strong><em>Dictionary and Set</em></strong></h3><h3><strong><em>Loops</em></strong></h3><h3><strong><em>Functions and recursion</em></strong></h3><h3><strong><em>File input and Output</em></strong></h3><h3><strong><em>OOPS</em></strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0bab1253ce9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>