<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Vipul's Blog</title><description>Learn ethical hacking ,computer programming, networking, technology news, computer virus creation, android,windows  &amp;amp; other operating system tricks.(JUST FOR EDUCATIONAL PURPOSE)
</description><managingEditor>noreply@blogger.com (Vipul's Blog)</managingEditor><pubDate>Wed, 6 Nov 2024 08:36:07 +0530</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">15</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>https://spyfellow.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:summary>Learn ethical hacking ,computer programming, networking, technology news, computer virus creation, android,windows &amp;amp; other operating system tricks.(JUST FOR EDUCATIONAL PURPOSE) </itunes:summary><itunes:subtitle>Learn ethical hacking ,computer programming, networking, technology news, computer virus creation, android,windows &amp;amp; other operating system tricks.(JUST FOR EDUCATIONAL PURPOSE) </itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Tkinter Geometry management</title><link>https://spyfellow.blogspot.com/2020/12/tkinter-geometry-management.html</link><category>KNOWLEDGE</category><category>PYTHON</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Mon, 28 Dec 2020 14:52:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-5828507566747819900</guid><description>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Tkinter Geometry management&lt;/title&gt;
  &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;



    &lt;style type='text/css'&gt;
        #main{
                height:1840;
                widht:105%;
                background-color:peachpuff;
                margin:20px;
                border-radius:20px;
                padding:20px;
      }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id='main'&gt;
    &lt;div id='first'&gt;
        &lt;h2&gt;Geometry Management&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;All Tkinter widgets have access to the specific geometry management methods, which have the purpose of organizing widgets throughout the parent widget area. Tkinter exposes the following geometry manager classes: pack, grid, and place.&lt;/p&gt;
        &lt;p&gt; &lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;b&gt;The pack() Method -&lt;/b&gt; This geometry manager organizes widgets in blocks before placing them in the parent widget.
            &lt;/li&gt;
            &lt;li&gt;&lt;b&gt;The grid() Method - &lt;/b&gt; This geometry manager organizes widgets in a table-like structure in the parent widget.
            &lt;/li&gt;
            &lt;li&gt;&lt;b&gt;The place() Method -&lt;/b&gt; This geometry manager organizes widgets by placing them in a specific position in the parent widget.&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id='third'&gt;
        &lt;h2&gt;Tkinter pack() Method&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;This geometry manager organizes widgets in blocks before placing them in the parent widget.&lt;/p&gt;
        &lt;h4&gt;Syntax&lt;/h4&gt;
        &lt;p&gt;widget.pack( pack_options )&lt;/p&gt;
        &lt;p&gt;Here is the list of possible options-
        &lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;b&gt;expand: &lt;/b&gt;When set to true, widget expands to fill any space not otherwise used in widget's parent.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;fill: &lt;/b&gt;Determines whether widget fills any extra space allocated to it by the packer, or keeps its own minimal dimensions: NONE (default), X (fill only horizontally), Y (fill only vertically), or BOTH (fill both horizontally and vertically).&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;side: &lt;/b&gt;Determines which side of the parent widget packs against: TOP (default), BOTTOM, LEFT, or RIGHT.&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;&lt;/p&gt;
        &lt;p&gt; &lt;/p&gt;
    &lt;/div&gt;
    &lt;div id='fourth'&gt;
        &lt;h2&gt;Tkinter grid() Method&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;This geometry manager organizes widgets in a table-like structure in the parent widget.&lt;/p&gt;
        &lt;h4&gt;Syntax&lt;/h4&gt;
        &lt;p&gt;widget.grid( grid_options )&lt;/p&gt;
        &lt;p&gt;Here is the list of possible options-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;b&gt;column :&lt;/b&gt; The column to put widget in; default 0 (leftmost column).&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;columnspan:&lt;/b&gt; How many columns widgetoccupies; default 1.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;ipadx, ipady :&lt;/b&gt;How many pixels to pad widget, horizontally and vertically, outside v's borders.
            &lt;/li&gt;
            &lt;li&gt;&lt;b&gt;row:&lt;/b&gt; The row to put widget in; default the first row that is still empty.
            &lt;/li&gt;
            &lt;li&gt;&lt;b&gt;rowspan : &lt;/b&gt;How many rowswidget occupies; default 1.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;sticky : &lt;/b&gt;What to do if the cell is larger than widget. By default, with sticky='', widget is centered in its cell. sticky may be the string concatenation of zero or more of N, E, S, W, NE, NW, SE, and SW, compass directions indicating the sides and corners of the cell to which widget sticks.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;padx, pady :&lt;/b&gt; How many pixels to pad widget, horizontally and vertically, outside v's borders.&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;&lt;/p&gt;

     &lt;/div&gt;
    &lt;div id='five'&gt;
        &lt;h2&gt;Tkinter place() Method&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;This geometry manager organizes widgets by placing them in a specific position in the parent widget.&lt;/p&gt;
        &lt;h4&gt;Syntax&lt;/h4&gt;
        &lt;p&gt;widget.place( place_options )&lt;/p&gt;
        &lt;p&gt;Here is the list of possible options-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;b&gt;anchor : &lt;/b&gt;The exact spot of widget other options refer to: may be N, E, S, W, NE, NW, SE, or SW, compass directions indicating the corners and sides of widget; default is NW (the upper left corner of widget)&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;bordermode :&lt;/b&gt; INSIDE (the default) to indicate that other options refer to the parent's inside (ignoring the parent's border); OUTSIDE otherwise.
            &lt;/li&gt;
            &lt;li&gt;&lt;b&gt;height, width : &lt;/b&gt;Height and width in pixels.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;relheight, relwidth :&lt;/b&gt;Height and width as a float between 0.0 and 1.0, as a fraction of the height and width of the parent widget.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;relx, rely : &lt;/b&gt;Horizontal and vertical offset as a float between 0.0 and 1.0, as a fraction of the height and width of the parent widget.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;x, y : &lt;/b&gt;Horizontal and vertical offset in pixels.&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;&lt;/p&gt;

     &lt;/div&gt;
     
  &lt;/div&gt;
  

&lt;/body&gt;    
&lt;/html&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Loops in Python</title><link>https://spyfellow.blogspot.com/2020/12/loops-in-python.html</link><category>KNOWLEDGE</category><category>PYTHON</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Wed, 23 Dec 2020 21:50:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-4208584923600037600</guid><description>&lt;head&gt;
	&lt;title&gt;CONSTANTS&lt;/title&gt;
	&lt;style type="text/css"&gt;
		#hhh {
			background-color: peachpuff;
			margin: 20px;
			padding: 30px;
			border-radius: 20px;
			font-family: open-sans;



		}

		#hh {

			padding: 40px;
			border-radius: 20px;
			background-color: skyblue;
			margin: 30px;
			font-size: 20px;

			font-family: Arial, Helvetica, sans-serif;
		}

		#hhhh {
			width: 3400px;
			padding: 40px;
			border-radius: 20px;
			background-color: #0BAF78;
			margin: 30px;
			font-size: 20px;
			height: 3200px;
		}

		#hhhhh {
			width: 1000px;
			padding: 40px;
			border-radius: 20px;
			background-color: #AFA30B;
			margin: 30px;
			font-size: 20px;
			height: 320px;
		}

		#j {
			width: 1000px;
			padding: 40px;
			border-radius: 20px;
			background-color: #AF5F0B;
			margin: 30px;
			font-size: 20px;
			height: 320px;
		}

		#jj {
			width: 1000px;
			padding: 40px;
			border-radius: 20px;
			background-color: #76AF0B;
			margin: 30px;
			font-size: 20px;
			height: 320px;
		}

		#jjj {
			width: 1000px;
			padding: 40px;
			border-radius: 20px;
			background-color: #0BAF73;
			margin: 30px;
			font-size: 20px;
			height: 320px;
		}

		#jjjj {
			width: 1000px;
			padding: 40px;
			border-radius: 20px;
			background-color: #0BAFA0;
			margin: 30px;
			font-size: 20px;
			height: 320px;
		}

		#jjjjj {
			width: 1000px;
			padding: 40px;
			border-radius: 20px;
			background-color: #0B78AF;
			margin: 30px;
			font-size: 20px;
			height: 320px;
		}

		#jjjjjj {
			width: 1000px;
			padding: 40px;
			border-radius: 20px;
			background-color: #0BAF78;
			margin: 30px;
			font-size: 20px;
			height: 200px;

		}

		#text {
			padding: 20px;

			background-color: black;
			color: white;
		}

		#ext {
			padding: 20px;
			background-color: white;
			color: black;
		}
	&lt;/style&gt;

&lt;body&gt;
	&lt;div id="hhh"&gt;
		&lt;div id="hh"&gt;


			&lt;h1 style="color:red;"&gt;Loops&lt;/h1&gt;
			&lt;p&gt;You go through your shopping list until you've collected every item from it. The dealer gives a card
				for each player until everyone has five.&lt;br&gt;The athlete does push-ups until reaching one-hundred...
				Loops everywhere! As for for loops in Python: they are perfect for processing repetitive programming
				tasks.
				&lt;br&gt;&lt;br&gt;


				In Python, and all other modern programming languages, iteration statements (also called loops)
				allow a set of instructions to be repeatedly executed until a certain condition is reached. This
				condition may be predetermined (as in the for loop) or open-ended (as in the while and do-while
				loops).

				In another way we can say, A loop can be used to tell a program to execute statements repeatedly. Or
				we can say that a loop repeatedly executes the same set of instructions until a termination
				condition is met.
			&lt;/p&gt;
			&lt;img src="https://data36.com/wp-content/uploads/2018/01/python-for-logic-3-768x469.png" height="400"
				width="600" margin-left:500;&gt;
			&lt;h3 style="color:red;"&gt;For Loop&lt;/h3&gt;
			&lt;p&gt;Python implements an iterator-based 'for loop'. It is a type of 'for loop' that iterates over a
				list of items through an explicit or implicit iterator.&lt;/p&gt;
			&lt;p&gt;The loop is introduced by the keyword 'for' which is followed by a random variable name&lt;/p&gt;
			&lt;p&gt;which will contain the values supplied by the object.&lt;/p&gt;
			&lt;p&gt;This is the syntax of Python's 'for loop':&lt;/p&gt;
			&lt;p ID="text"&gt;for variable in list:
				&lt;br&gt;statements
				&lt;br&gt;else:
				&lt;br&gt;statements
			&lt;/p&gt;

			&lt;p&gt;Here is an example of a 'for loop' in Python:&lt;/p&gt;

			&lt;p ID="text"&gt;pizza = ["New York Style Pizza", "Pan Pizza", "Thin n Crispy Pizza", "Stuffed Crust"
				,"Pizza"]&lt;br&gt;

				&lt;br&gt;for choice in pizza:

				&lt;br&gt;if choice == "Pan Pizza":
				&lt;br&gt;print("Please pay $16. Thank you!")
				&lt;br&gt;print("Delicious, cheesy " + choice)
				&lt;br&gt;else:
				&lt;br&gt;print("Cheesy pan pizza is my all-time favorite!")
				&lt;br&gt;print("Finally, I'm full!")
			&lt;/p&gt;
			&lt;p&gt;Run this and you'll get the following output on Python Shell:&lt;/p&gt;
			&lt;p ID="ext"&gt;Delicious, cheesy New York Style Pizza&lt;br&gt;
				Please pay $16. Thank you!&lt;br&gt;
				Delicious, cheesy Pan Pizza&lt;br&gt;
				Delicious, cheesy Thin n Crispy Pizza&lt;br&gt;
				Delicious, cheesy Stuffed Crust Pizza&lt;br&gt;
				Cheesy pan pizza is my all-time favorite!&lt;br&gt;
				Finally, I'm full!
			&lt;/p&gt;

			&lt;h3&gt;Using the range() Function with the for Loop
			&lt;/h3&gt;
			&lt;p&gt;The range() function can be combined with the 'for loop' to supply the numbers required
				by the loop. In the following example, the range(1, x+1) provided the numbers 1 to 50
				needed by the 'for loop' to add the sum of 1 until 50:&lt;/p&gt;
			&lt;p ID="text"&gt;x = 50&lt;br&gt;
				total = 0&lt;br&gt;
				for number in range(1, x+1):&lt;br&gt;
				total = total + number&lt;br&gt;
				print('Sum of 1 until %d: %d' % (x, total))&lt;/p&gt;
			&lt;p&gt;The Python Shell will display:&lt;/p&gt;
			&lt;p ID="ext"&gt;l.py&lt;br&gt;
				Sum of 1 until 50: 1275&lt;/p&gt;


			&lt;h3&gt;The While Loop&lt;/h3&gt;
			&lt;p&gt;A Python 'while loop' repeatedly carries out a target statement while the condition is true.
				The loop iterates as long as the defined condition is true. When it ceases to be true and
				becomes false, control passes to the first line after the loop.&lt;/p&gt;

			&lt;/p&gt;The 'while loop' has the following syntax:&lt;/p&gt;
			&lt;p ID="text"&gt;while condition
				&lt;br&gt;statement
				&lt;br&gt;statement
			&lt;/p&gt;
			&lt;p&gt;Here is a simple 'while loop':&lt;br&gt;
			&lt;p ID="text"&gt;counter = 0
				&lt;br&gt;while (counter &lt; 10): &lt;br&gt;print('The count is:' , counter)
					&lt;br&gt;counter = counter + 1
					&lt;br&gt;print('Done!')
			&lt;/p&gt;
			&lt;p&gt;If you run the code, you should see this output:&lt;/p&gt;
			&lt;p ID="ext"&gt;l.py&lt;br&gt;
				&lt;br&gt;The count is: 0
				&lt;br&gt;The count is: 1
				&lt;br&gt;The count is: 2
				&lt;br&gt;The count is: 3
				&lt;br&gt;The count is: 4
				&lt;br&gt;The count is: 5
				&lt;br&gt;The count is: 6
				&lt;br&gt;The count is: 7
				&lt;br&gt;The count is: 8
				&lt;br&gt;The count is: 9
				&lt;br&gt;Done!
			&lt;/p&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Conditionals in Python</title><link>https://spyfellow.blogspot.com/2020/11/conditionals-in-python.html</link><category>KNOWLEDGE</category><category>PYTHON</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Sat, 28 Nov 2020 19:42:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-7884194472248552595</guid><description>&lt;head&gt;&lt;title&gt;If-else&lt;/title&gt;
   &lt;style type="text/css"&gt;
   #hhh{
        height:4300;
        width:95%;
        background-color:peachpuff;
        margin:20px;
        border-radius:20px;
        padding:20px;
		}
  
	  
#jjjjjj{
      height:4200;
      width:80%;
      background-color:skyblue;
      margin:20px;
      border-radius:20px;
      padding:30px;
	  }
	  #page1{
	  
	  font-weight:bold;
	  }
	  
	  &lt;/style&gt;
	  &lt;body&gt;
	  &lt;div id="hhh"&gt;
	  &lt;div id="jjjjjj"&gt;
	  
&lt;h1 style="color:red;margin-left:250px;margin-top:-20px;"&gt;If-Else&lt;/h1&gt;
&lt;h3 style="color:red;"&gt;Introduction&lt;/h3&gt;
&lt;p&gt;We use if statements in our everyday life all the time - even if our everyday life is not written in Python. If the light is green then I'll cross the road; otherwise I'll wait. If the sun is up then I'll get out of bed; otherwise I'll go back to sleep. Okay, maybe it's not this direct, but when we take actions based on conditions, our brain does what a computer would do: evaluate the conditions and act upon the results. Well, a computer script doesn't have a subconscious mind, so for practicing data science we have to understand how an if statement works and how we can apply it in Python!&lt;/p&gt;

&lt;img src="https://data36.com/wp-content/uploads/2018/01/1-Python-if-statement-logic-768x374.png"&gt;
&lt;p&gt;Let's say we have two values: a = 10 and b = 20. We compare these two values: a == b. &lt;br&gt;This comparison has either a True or a False output. (Test it in your Jupyter Notebook!)&lt;/p&gt;
&lt;img src="https://data36.com/wp-content/uploads/2018/01/2-Python-if-statement-comparison-1-768x148.png"&gt;
&lt;p&gt;We can go even further and set a condition: if a == b is True then we print 'yes'. &lt;br&gt;If it's False then we print 'no'. And that's it, this is the logic of the Python if statements. &lt;br&gt;Here's the syntax:&lt;/p&gt;
&lt;img src="https://data36.com/wp-content/uploads/2018/01/Python-if-statement-example-768x226.png"&gt;
&lt;p&gt;Run this mini script in your Jupyter Notebook! The result will be (obviously): no.&lt;/p&gt;
&lt;p&gt;Now, try the same - but set b to 10!&lt;/p&gt;
&lt;p&gt;The returned message is yes.&lt;/p&gt;
&lt;img src="https://data36.com/wp-content/uploads/2018/01/Python-if-statement-example2-768x221.png"&gt;
&lt;h1 "left-margin:400"&gt;Python if statement syntax&lt;/h1&gt;
&lt;p&gt;Let's take a look at the syntax,&lt;br&gt; because it has pretty strict rules.&lt;/p&gt;
&lt;p&gt;The basics are simple:&lt;/p&gt;
&lt;img src="https://data36.com/wp-content/uploads/2018/01/Python-if-statement-syntax-768x273.png"&gt;
&lt;p&gt;You have:&lt;/p&gt;

&lt;p&gt;1.an if keyword, then&lt;/p&gt;
&lt;p&gt;2.a condition, then&lt;/p&gt;
&lt;p&gt;3.a statement, then&lt;/p&gt;
&lt;p&gt;4.an else keyword, then&lt;/p&gt;
&lt;p&gt;5.another statement.&lt;/p&gt;
&lt;p&gt;6.However, there are two things to watch out for:&lt;/p&gt;
&lt;p ID="page1"&gt;1. Never miss the colons at the end of the if and else lines!&lt;/p&gt;
&lt;img src="https://data36.com/wp-content/uploads/2018/01/Python-if-statement-syntax-colon-768x315.png"&gt;
&lt;p ID="page1"&gt;2. And never miss the indentation at the beginning of the statement-lines!&lt;/p&gt;
&lt;img src="https://data36.com/wp-content/uploads/2018/01/Python-if-statement-syntax-indentation-768x306.png"&gt;
&lt;p&gt;If you miss any of the above two, an error message will be returned saying "invalid syntax" and your Python script will fail.&lt;/p&gt;
&lt;h3&gt;Python if statements - level 2&lt;/h3&gt;
&lt;p&gt;Now that you understand the basics, it's time to make your conditions more complex - by using arithmetic, comparison and logical operators. (Note: if the word "operators" does not ring any bells, you might want to check out this article first:&lt;/p&gt;

&lt;p&gt;This script will return yes, since both of the conditions, (a + b) / c == 1 and c - b - a == 0 are actually True and the logical operator between them was: and.&lt;/p&gt;
&lt;img src="https://data36.com/wp-content/uploads/2018/01/Python-if-statement-multiple-conditions-768x250.png"&gt;
&lt;p&gt;Of course, you can make this even more complex if you want, but the point is: having multiple operators in an if statement is absolutely possible - in fact, it's pretty common in real life scenarios!&lt;/p&gt;
&lt;h3&gt;Python if statements - level 3&lt;/h3&gt;
&lt;p&gt;You can take it to the next level again, by using the elif keyword (which is a short form of the "else if" phrase) to create condition-sequences. "Condition-sequence" sounds fancy but what really happens here is just adding an if statement into an if statement:&lt;/p&gt;
&lt;img src="https://data36.com/wp-content/uploads/2018/01/10-Python-if-statement-condition-sequence-logic-768x355.png"&gt;
&lt;p&gt;Sure enough the result will be "second condition is true".

&lt;/p&gt;
&lt;img src="https://data36.com/wp-content/uploads/2018/01/Python-if-statement-condition-sequence-768x300.png"&gt;
&lt;p&gt;You can do this infinite times, and build up a huge if-elif-elif-...-elif-else sequence if you want!
&lt;br&gt;
And... This was more or less everything you have to know about Python if statements.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;


</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Function in Python</title><link>https://spyfellow.blogspot.com/2020/11/function-in-python.html</link><category>KNOWLEDGE</category><category>PYTHON</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Fri, 27 Nov 2020 01:10:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-829634953019975283</guid><description>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;style type='text/css'&gt;
        #main{
                height:3800;
                widht:95%;
                background-color:peachpuff;
                margin:20px;
                border-radius:20px;
                padding:20px;
                 }
        #first{
                height:900;
                widht:80%;
                background-color:skyblue;
                margin:20px;
                border-radius:20px;
                padding:30px;
                 }
        .w1{
            height:150px;
            width:50%;
            background-color:aliceblue;
            padding:20px;
            border-radius:20px;
        }
        .w2{
            height:300px;
            width:50%;
            background-color:aliceblue;
            padding:20px;
            border-radius:20px;
        }
         #second{
                height:1200;
                widht:80%;
                background-color:skyblue;
                margin:20px;
                border-radius:20px;
                padding:30px;
                 }
         #third{
                height:700;
                widht:80%;
                background-color:skyblue;
                margin:20px;
                border-radius:20px;
                padding:30px;
                 }
         #fourth{
                height:630;
                widht:80%;
                background-color:skyblue;
                margin:20px;
                border-radius:20px;
                padding:30px;
                 }
        .w3{
            height:500px;
            width:50%;
            background-color:aliceblue;
            padding:20px;
            border-radius:20px;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id='main'&gt;
    &lt;div id='first'&gt;
        &lt;h2&gt;Functions &lt;/h2&gt;
        &lt;p&gt;A function is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing.&lt;/p&gt;
        &lt;p&gt;As you already know, Python gives you many built-in functions like print(), etc. but you can also create your own functions. These functions are called user-defined functions.&lt;/p&gt;
      &lt;div class="separator" style="clear: both;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibuzOQwCSzy0ksMzlfdB5XfvKUuxW7O1GB1r1jDfshBV7yq5JlMmlLtC_ABvYGZsb0UeZFma-ofCiGiUkZ3QbT7uucHrsb_cngu40_pjrHeUGHww8KVxBa04RmsBw0tkM0uyYl_VJqe4i/s0/photo-1555949963-aa79dcee981c.jpg" style="display: block; padding: 1em 0; text-align: center; "&gt;&lt;img alt="" border="0" data-original-height="1333" data-original-width="2000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibuzOQwCSzy0ksMzlfdB5XfvKUuxW7O1GB1r1jDfshBV7yq5JlMmlLtC_ABvYGZsb0UeZFma-ofCiGiUkZ3QbT7uucHrsb_cngu40_pjrHeUGHww8KVxBa04RmsBw0tkM0uyYl_VJqe4i/s0/photo-1555949963-aa79dcee981c.jpg"/&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;h4&gt;Defining a Function&lt;/h4&gt;
        &lt;hr&gt;
        &lt;p&gt;You can define functions to provide the required functionality. Here are simple rules to define a function in Python.&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;Function blocks begin with the keyword def followed by the function name and parentheses ( ( ) ).&lt;/li&gt;
            &lt;li&gt;Any input parameters or arguments should be placed within these parentheses. You can also define parameters inside these parentheses.&lt;/li&gt;
            &lt;li&gt;The first statement of a function can be an optional statement - the documentation string of the function or docstring.&lt;/li&gt;
            &lt;li&gt;The code block within every function starts with a colon (:) and is indented.&lt;/li&gt;
            &lt;li&gt;The statement return [expression] exits a function, optionally passing back an expression to the caller. A return statement with no arguments is the same as return None.&lt;/li&gt;
        &lt;/ul&gt;
        &lt;hr&gt;
        &lt;p&gt;Syntax:&lt;/p&gt;
        &lt;div class='w1'&gt;
            &lt;p&gt; def functionname( parameters ):&lt;/p&gt;
            &lt;p&gt;"function_docstring"&lt;/p&gt;
            &lt;p&gt;function_suite&lt;/p&gt;
            &lt;p&gt;return [expression]&lt;/p&gt;
        &lt;/div&gt;
        &lt;p&gt;By default, parameters have a positional behavior and you need to inform them in the same order that they were defined.&lt;/p&gt;
        &lt;p&gt;example:&lt;/p&gt;
        &lt;p&gt;The following function takes a string as input parameter and prints it on the standard screen.&lt;/p&gt;
        &lt;div class='w1'&gt;
            &lt;p&gt; def printme( str ):&lt;/p&gt;
            &lt;p&gt;"This prints a passed string into this function"&lt;/p&gt;
            &lt;p&gt; print (str)&lt;/p&gt;
            &lt;p&gt;return &lt;/p&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id='second'&gt;
        &lt;h2&gt;Calling a Function&lt;/h2&gt;
        &lt;p&gt;Defining a function gives it a name, specifies the parameters that are to be included in the function and structures the blocks of code.&lt;/p&gt;
        &lt;p&gt;Once the basic structure of a function is finalized, you can execute it by calling it from another function or directly from the Python prompt. Following is an example to call the printme() function-&lt;/p&gt;
        &lt;div class='w2'&gt;
            &lt;p&gt;def printme( str ):&lt;/p&gt;
            &lt;p&gt;"This prints a passed string into this function"&lt;/p&gt;
            &lt;p&gt; print (str)&lt;/p&gt;
            &lt;p&gt;return &lt;/p&gt;
            &lt;p&gt;printme("This is first call to the user defined function!")&lt;/p&gt;
            &lt;p&gt;printme("Again second call to the same function")&lt;/p&gt;
            &lt;hr&gt;
            &lt;p&gt;This is first call to the user defined function!&lt;/p&gt;
            &lt;p&gt;Again second call to the same function&lt;/p&gt;
        &lt;/div&gt;
       
        &lt;h2&gt;Pass by Reference vs Value&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;&lt;/p&gt;
        &lt;p&gt;All parameters (arguments) in the Python language are passed by reference. It means if you change what a parameter refers to within a function, the change also reflects back in the calling function. For example- &lt;/p&gt;
        &lt;p&gt;&lt;/p&gt;
        &lt;div class='w3'&gt;
            &lt;p&gt; def changeme( mylist ):&lt;/p&gt;
            &lt;p&gt;"This changes a passed list into this function"&lt;/p&gt;
            &lt;p&gt; print ("Values inside the function before change: ", mylist)&lt;/p&gt;
            &lt;p&gt;mylist[2]=50 &lt;/p&gt;
            &lt;p&gt;print ("Values inside the function after change: ", mylist)&lt;/p&gt;
            &lt;p&gt; return&lt;/p&gt;
            &lt;p&gt;mylist = [10,20,30]&lt;/p&gt;
            &lt;p&gt;changeme( mylist )&lt;/p&gt;
            &lt;p&gt;print ("Values outside the function: ", mylist)&lt;/p&gt;
            &lt;hr&gt;
            &lt;p&gt;OUTPUT:&lt;/p&gt;
            &lt;p&gt;Values inside the function before change: [10, 20, 30]&lt;/p&gt;
            &lt;p&gt;Values inside the function after change: [10, 20, 50]&lt;/p&gt;
            &lt;p&gt;Values outside the function: [10, 20, 50]&lt;/p&gt;
            &lt;p&gt;&lt;/p&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id='third'&gt;
        &lt;h2&gt;Function Arguments &lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;You can call a function by using the following types of formal arguments-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;Required arguments&lt;/li&gt;
            &lt;li&gt;Keyword arguments&lt;/li&gt;
            &lt;li&gt;Default arguments&lt;/li&gt;
            &lt;li&gt;Variable-length arguments&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt; &lt;/p&gt;
        &lt;h3&gt;Required Arguments&lt;/h3&gt;
        &lt;hr&gt;
        &lt;p&gt;Required arguments are the arguments passed to a function in correct positional order. Here, the number of arguments in the function call should match exactly with the function definition.&lt;/p&gt;
        &lt;p&gt;To call the function printme(), you definitely need to pass one argument, otherwise it gives a syntax error &lt;/p&gt;
        &lt;p&gt; &lt;/p&gt;
        &lt;h3&gt;Keyword Arguments&lt;/h3&gt;
        &lt;hr&gt;
        &lt;p&gt;Keyword arguments are related to the function calls. When you use keyword arguments in a function call, the caller identifies the arguments by the parameter name.&lt;/p&gt;
        &lt;p&gt;This allows you to skip arguments or place them out of order because the Python interpreter is able to use the keywords provided to match the values with parameters. You can also make keyword calls to the printme() function&lt;/p&gt;
        &lt;p&gt; &lt;/p&gt;
        &lt;h3&gt;Default Arguments&lt;/h3&gt;
        &lt;hr&gt;
        &lt;p&gt;A default argument is an argument that assumes a default value if a value is not provided in the function call for that argument.&lt;/p&gt;
        &lt;p&gt; &lt;/p&gt;
        &lt;h3&gt;Variable-length Arguments&lt;/h3&gt;
        &lt;hr&gt;
        &lt;p&gt;You may need to process a function for more arguments than you specified while defining the function. These arguments are called variable-length arguments and are not named in the function definition, unlike required and default arguments.&lt;/p&gt;
        &lt;p&gt;&lt;/p&gt;
        &lt;p&gt; &lt;/p&gt;
    &lt;/div&gt;
    &lt;div id='fourth'&gt;
        &lt;h2&gt;The Anonymous Functions &lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;These functions are called anonymous because they are not declared in the standard manner by using thedefkeyword. You can use thelambdakeyword to create small anonymous functions.&lt;/p&gt;
        
        &lt;ul&gt;
            &lt;li&gt;Lambda forms can take any number of arguments but return just one value in the form of an expression. They cannot contain commands or multiple expressions.&lt;/li&gt;
            &lt;li&gt;An anonymous function cannot be a direct call to print because lambda requires an expression.&lt;/li&gt;
            &lt;li&gt;Lambda functions have their own local namespace and cannot access variables other than those in their parameter list and those in the global namespace.&lt;/li&gt;
            &lt;li&gt;Although it appears that lambdas are a one-line version of a function, they are not equivalent to inline statements in C or C++, whose purpose is to stack allocation by passing function, during invocation for performance reasons.&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;Syntax:&lt;/p&gt;
        &lt;div class="w2"&gt;
            &lt;p&gt;lambda [arg1 [,arg2,.....argn]]:expression&lt;/p&gt;
            &lt;hr&gt;
            &lt;p&gt;example:&lt;/p&gt;
            &lt;p&gt;sum = lambda arg1, arg2: arg1 + arg2&lt;/p&gt;
            &lt;p&gt;print ("Value of total : ", sum( 10, 20 ))&lt;/p&gt;
            &lt;p&gt;print ("Value of total : ", sum( 20, 20 ))&lt;/p&gt;
            &lt;p&gt; OUTPUT:&lt;/p&gt;
            &lt;p&gt;Value of total :  30&lt;/p&gt;
            &lt;p&gt;Value of total :  40&lt;/p&gt;
        &lt;/div&gt;
    &lt;/div&gt;
   
  &lt;/div&gt;
&lt;/body&gt;    
&lt;/html&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibuzOQwCSzy0ksMzlfdB5XfvKUuxW7O1GB1r1jDfshBV7yq5JlMmlLtC_ABvYGZsb0UeZFma-ofCiGiUkZ3QbT7uucHrsb_cngu40_pjrHeUGHww8KVxBa04RmsBw0tkM0uyYl_VJqe4i/s72-c/photo-1555949963-aa79dcee981c.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Operators</title><link>https://spyfellow.blogspot.com/2020/11/operators.html</link><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Wed, 25 Nov 2020 19:12:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-4278018023164450647</guid><description>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;style type='text/css'&gt;
        #main{
                height:8400;
                widht:95%;
                background-color:peachpuff;
                margin:20px;
                border-radius:20px;
                padding:20px;
                 }
        #first{
                height:400;
                widht:80%;
                background-color:skyblue;
                margin:20px;
                border-radius:20px;
                padding:30px;
                 }
        #second{
                height:1130;
                widht:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #third{
                height:1000;
                widht:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #fourth{
                height:1230;
                widht:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #five{
                height:1230;
                widht:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #six{
                height:550;
                widht:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #seven{
                height:450;
                widht:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #eight{
                height:420;
                widht:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #nine{
                height:1000;
                widht:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id='main'&gt;
    &lt;div id='first'&gt;
        &lt;h1&gt;Operators&lt;/h1&gt;
        &lt;p&gt;Operators are the constructs, which can manipulate the value of operands. Consider the expression 4 + 5 = 9. Here, 4 and 5 are called operands and + is called the operator.&lt;/p&gt;
      &lt;div class="separator" style="clear: both;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-6A6A22SfA3jn1KCI1nOTN66LJ-jpDXg0H_ebrBUlfqLoZiURT52ORHiCTyVLN1VXntFm8pmhyphenhyphenHI2GWnvpHMSTlvgzuZSScFKLOlpng69oF0uk_OvK3R3ZsaCGGQUPhj0JerqHLmyB9-J/s0/gfdf.jpg" style="display: block; padding: 1em 0; text-align: center; "&gt;&lt;img alt="" border="0" data-original-height="720" data-original-width="1200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-6A6A22SfA3jn1KCI1nOTN66LJ-jpDXg0H_ebrBUlfqLoZiURT52ORHiCTyVLN1VXntFm8pmhyphenhyphenHI2GWnvpHMSTlvgzuZSScFKLOlpng69oF0uk_OvK3R3ZsaCGGQUPhj0JerqHLmyB9-J/s0/gfdf.jpg"/&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;h2&gt;Types of Operator&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;Python language supports the following types of operators-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;Arithmetic Operators&lt;/li&gt;
            &lt;li&gt;Comparison (Relational) Operators&lt;/li&gt;
            &lt;li&gt;Assignment Operators&lt;/li&gt;
            &lt;li&gt;Logical Operators&lt;/li&gt;
            &lt;li&gt;Bitwise Operators&lt;/li&gt;
            &lt;li&gt;Membership Operators&lt;/li&gt;
            &lt;li&gt;Identity Operators&lt;/li&gt;
        &lt;ul&gt;
    &lt;/div&gt;
    &lt;div id='second'&gt;
        &lt;h2&gt;Python Arithmetic Operators&lt;/h2&gt;
        &lt;p&gt;Assume variable a holds the value 10 and variable b holds the value 21, then-&lt;/p&gt;
        &lt;hr&gt;
        &lt;p&gt;Operators and their description:-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;
                &lt;b&gt;+ Addition&lt;/b&gt;
                &lt;p&gt;Adds values on either side of the operator.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;a + b = 31&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;- Subtraction&lt;/b&gt;
                &lt;p&gt;Subtracts right hand operand from left hand operand.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;a - b = -11&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;* Multiplication&lt;/b&gt;
                &lt;p&gt;Multiplies values on either side of the operator&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;a * b = 210&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;/ Division&lt;/b&gt;
                &lt;p&gt;Divides left hand operand by right hand operand&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;b / a = 2.1&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;% Modulus&lt;/b&gt;
                &lt;p&gt;Divides left hand operand by right hand operand and returns remainder&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;b%a=1&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;** Exponent&lt;/b&gt;
                &lt;p&gt;Performs exponential (power) calculation on operators&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;a**b =10 to the power 20&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;//&lt;/b&gt;
                &lt;p&gt;Floor Division - The division of operands where the result is the quotient in which the digits after the decimal point are removed.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt; 9//2 = 4 and 9.0//2.0 = 4.0&lt;/p&gt;
            &lt;/li&gt;
        &lt;ul&gt;
    &lt;/div&gt;
    &lt;div id='third'&gt;
        &lt;h2&gt;Python Comparison Operators&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;These operators compare the values on either side of them and decide the relation among them. They are also called Relational operators.&lt;/p&gt;
        &lt;p&gt;Assume variable a holds the value 10 and variable b holds the value 20, then-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;
                &lt;b&gt;==&lt;/b&gt;
                &lt;p&gt;If the values of two operands are equal, then the condition becomes true.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a == b) is not true.&lt;/p&gt;
            &lt;/li&gt;
             &lt;li&gt;
                &lt;b&gt;!=&lt;/b&gt;
                &lt;p&gt;If values of two operands are not equal, then condition becomes true.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a!= b) is true.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&gt;&lt;/b&gt;
                &lt;p&gt;If the value of left operand is greater than the value of right operand, then condition becomes true.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a &gt; b) is not true.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&lt;&lt;/b&gt;
                &lt;p&gt;If the value of left operand is less than the value of right operand, then condition becomes true.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a &lt; b) is true.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&gt;=&lt;/b&gt;
                &lt;p&gt;If the value of left operand is greater than or equal to the value of right operand, then condition becomes true.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a &gt;= b) is not true.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&lt;=&lt;/b&gt;
                &lt;p&gt;If the value of left operand is less than or equal to the value of right operand, then condition becomes true.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a &lt;= b) is true.&lt;/p&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
       
    &lt;/div&gt;
    &lt;div id='fourth'&gt;
        &lt;h4&gt;Python Assignment Operators&lt;/h4&gt;
        &lt;hr&gt;
        &lt;p&gt;Assume variable a holds 10 and variable b holds 20, then-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;
                &lt;b&gt;=&lt;/b&gt;
                &lt;p&gt;Assigns values from right side operands to left side operand&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;c = a + b assigns value of a + b into c&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;+= Add AND&lt;/b&gt;
                &lt;p&gt;It adds right operand to the left operand and assign the result to left operand&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;c += a is equivalent to c = c + a&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;-= Subtract AND&lt;/b&gt;
                &lt;p&gt;It subtracts right operand from the left operand and assign the result to left operand&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;c -= a is equivalent to c = c - a&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;*= Multiply AND&lt;/b&gt;
                &lt;p&gt;It multiplies right operand with the left operand and assign the result to left operand&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;c *= a is equivalent to c = c * a&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;/= Divide AND&lt;/b&gt;
                &lt;p&gt;It divides left operand with the right operand and assign the result to left operand&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;c /= a is equivalent to c = c / ac /= a is equivalent to c = c / a&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;%= Modulus AND&lt;/b&gt;
                &lt;p&gt;It takes modulus using two operands and assign the result to left operand&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;c %= a is equivalent to c = c % a&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;**= Exponent AND&lt;/b&gt;
                &lt;p&gt;Performs exponential (power) calculation on operators and assign value to the left operand&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;c **= a is equivalent to c = c ** a&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;//= Floor Division&lt;/b&gt;
                &lt;p&gt;It performs floor division on operators and assign value to the left operand&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;c //= a is equivalent to c = c // a&lt;/p&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div id='five'&gt;
        &lt;h2&gt;Python Bitwise Operators&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;Bitwise operator works on bits and performs bit-by-bit operation. Assume if a = 60; and b = 13; Now in binary format they will be as follows-&lt;/p&gt;
        &lt;p&gt;a = 0011 1100&lt;/p&gt;
        &lt;p&gt;b = 0000 1101&lt;/p&gt;
        &lt;p&gt;-----------------&lt;/p&gt;
        &lt;p&gt;a&amp;b = 0000 1100&lt;/p&gt;
        &lt;p&gt;a|b = 0011 1101&lt;/p&gt;
        &lt;p&gt;a^b = 0011 0001&lt;/p&gt;
        &lt;p&gt;~a = 1100 0011&lt;/p&gt;
        &lt;p&gt;Pyhton's built-in function bin() can be used to obtain binary representation of an integer number.&lt;/p&gt;
        &lt;p&gt;The following Bitwise operators are supported by Python language-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;
                &lt;b&gt;&amp; Binary AND&lt;/b&gt;
                &lt;p&gt;Operator copies a bit to the result, if it exists in both operands&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a &amp; b) (means 0000 1100)&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;| Binary OR&lt;/b&gt;
                &lt;p&gt;It copies a bit, if it exists in either operand.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;^ Binary XOR&lt;/b&gt;
                &lt;p&gt;It copies the bit, if it is set in one operand but not both.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a ^ b) = 49 (means 0011 0001)&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;~ Binary Ones Complement&lt;/b&gt;
                &lt;p&gt;It is unary and has the effect of 'flipping' bits.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(~a ) = -61 (means 1100 0011 in 2's complement form due to a signed binary number.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&lt;&lt; Binary Left Shift&lt;/b&gt;
                &lt;p&gt;The left operand’s value is moved left by the number of bits specified by the right operand.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;a &lt;&lt; = 240 (means 1111 0000)&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&gt;&gt; Binary Right Shift&lt;/b&gt;
                &lt;p&gt;The left operand’s value is moved right by the number of bits specified by the right operand.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;a &gt;&gt; = 15 (means 0000 1111)&lt;/p&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div id='six'&gt;
        &lt;h2&gt;Python Logical Operators&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;The following logical operators are supported by Python language. Assume variable a holds True and variable b holds False then-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;
                &lt;b&gt;and Logical AND&lt;/b&gt;
                &lt;p&gt;If both the operands are true then condition becomes true.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a and b) is False.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;or Logical OR&lt;/b&gt;
                &lt;p&gt;If any of the two operands are non-zero then condition becomes true.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;(a or b) is True.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;not Logical NOT&lt;/b&gt;
                &lt;p&gt;Used to reverse the logical state of its operand.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;Not(a and b) is True.&lt;/p&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div id='seven'&gt;
        &lt;h2&gt;Python Membership Operators&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;Python’s membership operators test for membership in a sequence, such as strings, lists, or tuples. There are two membership operators as explained below-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;
                &lt;b&gt;in&lt;/b&gt;
                &lt;p&gt;Evaluates to true, if it finds a variable in the specified sequence and false otherwise.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;x in y, here in results in a 1 if x is a member of sequence y.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;not in&lt;/b&gt;
                &lt;p&gt;Evaluates to true, if it does not find a variable in the specified sequence and false otherwise.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;x not in y, here not in results in a 1 if x is not a member of sequence Y&lt;/p&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div id='eight'&gt;
        &lt;h2&gt;Python Identity Operators&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;Identity operators compare the memory locations of two objects. There are two Identity operators as explained below:&lt;/p&gt;
        &lt;ul&gt;
           &lt;li&gt;
                &lt;b&gt;is&lt;/b&gt;
                &lt;p&gt;Evaluates to true if the variables on either side of the operator point to the same object and false otherwise.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;x is y, here is results in 1 if id(x) equals id(y).&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;is not&lt;/b&gt;
                &lt;p&gt;Evaluates to false if the variables on either side of the operator point to the same object and true otherwise.&lt;/p&gt;
                &lt;p&gt;example:-&lt;/p&gt;
                &lt;p&gt;x is not y, here is not results in 1 if id(x) is not equal to id(y)&lt;/p&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div id='nine'&gt;
        &lt;h2&gt;Python Operators Precedence&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;The following table lists all the operators from highest precedence to the lowest.&lt;/p&gt;
        &lt;ul&gt;
           &lt;li&gt;
                &lt;b&gt;**&lt;/b&gt;
                &lt;p&gt;Exponentiation (raise to the power)&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;~ +-&lt;/b&gt;
                &lt;p&gt;Ccomplement, unary plus and minus (method names for the last two are +@ and -@)&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;* / % //&lt;/b&gt;
                &lt;p&gt;Multiply, divide, modulo and floor division&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;+-&lt;/b&gt;
                &lt;p&gt;Addition and subtraction&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&gt;&gt; &lt;&lt;&lt;/b&gt;
                &lt;p&gt;Right and left bitwise shift&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&amp;&lt;/b&gt;
                &lt;p&gt;Bitwise 'AND'&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;^|&lt;/b&gt;
                &lt;p&gt;Bitwise exclusive `OR' and regular `OR'&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&lt;= &lt; &gt; &gt;=&lt;/b&gt;
                &lt;p&gt;Comparison operators&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;&lt;&gt; == !=&lt;/b&gt;
                &lt;p&gt;Equality operators&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;= %= /= //= -= += *= **=&lt;/b&gt;
                &lt;p&gt;Assignment operators&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;is is not&lt;/b&gt;
                &lt;p&gt;Identity operators&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;in not in&lt;/b&gt;
                &lt;p&gt;Membership operators&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;b&gt;not or and&lt;/b&gt;
                &lt;p&gt;Logical operators&lt;/p&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;    
&lt;/html&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-6A6A22SfA3jn1KCI1nOTN66LJ-jpDXg0H_ebrBUlfqLoZiURT52ORHiCTyVLN1VXntFm8pmhyphenhyphenHI2GWnvpHMSTlvgzuZSScFKLOlpng69oF0uk_OvK3R3ZsaCGGQUPhj0JerqHLmyB9-J/s72-c/gfdf.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data Types in Python</title><link>https://spyfellow.blogspot.com/2020/11/data-types-in-python.html</link><category>KNOWLEDGE</category><category>PYTHON</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Wed, 25 Nov 2020 02:00:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-4607509573838150263</guid><description>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;style type='text/css'&gt;
        #main{
                height:8800;
                width:95%;
                background-color:peachpuff;
                margin:20px;
                border-radius:20px;
                padding:20px;
                 }
        #first{
                height:1600;
                width:80%;
                background-color:skyblue;
                margin:20px;
                border-radius:20px;
                padding:30px;
                 }
        #second{
                height:300;
                width:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #third{
                height:550;
                width:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #fourth{
                height:1070;
                width:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #f1{
                height:300;
                width:30%;
                background-color:aliceblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #f2{
                height:100;
                width:30%;
                background-color:aliceblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #five{
                height:1130;
                width:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #six{
                height:1600;
                width:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #seven{
                height:1170;
                width:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
        #eight{
                height:500;
                width:80%;
                background-color:skyblue;
                margin:50px;
                border-radius:20px;
                padding:30px;
                 }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id='main'&gt;
    &lt;div id='first'&gt;
        &lt;h2&gt;Data types&lt;/h2&gt;
        &lt;hr&gt;
        &lt;h1 &gt;Introduction to Data types&lt;/h1&gt;
        &lt;p&gt;In computer science and computer programming, a data type or simply type is a classification of data which tells the compiler or interpreter how the programmer intends to use the data. Most programming languages support various types of data, for example: real, integer or Boolean. A data type provides a set of values from which an expression (i.e. variable, function...) may take its values. This data type defines the operations that can be done on the data, the meaning of the data, and the way values of that type can be stored. A type of value from which an expression may take its value&lt;/p&gt;
      &lt;div class="separator" style="clear: both;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGr257-US3BFlIorE_PJ_52C0i86yT6Sj79152lc1BVoU-0akoIv3Kq1gCB5SECbpCqfDavs_OZ2nCWAFR0X0PtI_iN1889tv4Bc-u5yyeCgIhfU4SQy8xWDLHNmjD8vgks6KAQR0Ra3_s/s0/1_8J9yViDiXqNYeEWctWkdfQ.jpeg" style="display: block; padding: 1em 0; text-align: center; "&gt;&lt;img alt="" border="0" data-original-height="486" data-original-width="631" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGr257-US3BFlIorE_PJ_52C0i86yT6Sj79152lc1BVoU-0akoIv3Kq1gCB5SECbpCqfDavs_OZ2nCWAFR0X0PtI_iN1889tv4Bc-u5yyeCgIhfU4SQy8xWDLHNmjD8vgks6KAQR0Ra3_s/s0/1_8J9yViDiXqNYeEWctWkdfQ.jpeg"/&gt;&lt;/a&gt;&lt;/div&gt; 
      &lt;h2&gt;Variables&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;Variables are nothing but reserved memory locations to store values. It means that when you create a variable, you reserve some space in the memory.&lt;/p&gt;
        &lt;p&gt;Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to the variables, you can store integers, decimals or characters in these variables.&lt;/p&gt;
        &lt;h4&gt;Assigning Values to Variables&lt;/h4&gt;
        &lt;p&gt;Python variables do not need explicit declaration to reserve memory space. The declaration happens automatically when you assign a value to a variable. The equal sign (=) is used to assign values to variables.
        &lt;/p&gt;
        &lt;p&gt;The operand to the left of the = operator is the name of the variable and the operand to the right of the = operator is the value stored in the variable. &lt;/p&gt;
        &lt;p&gt; For example-&lt;/p&gt;
        &lt;div id='f1'&gt;
        &lt;p&gt;counter = 100&lt;/p&gt;
        &lt;p&gt;miles   = 1000.0&lt;/p&gt;
        &lt;p&gt;name    = "John"&lt;/p&gt;
        &lt;p&gt;print (counter)&lt;/p&gt;
        &lt;p&gt;print (miles)&lt;/p&gt;
        &lt;p&gt;print (name)&lt;/p&gt;
        &lt;/div&gt;
        &lt;p&gt;Here, 100, 1000.0 and "John" are the values assigned to counter, miles, and name variables, respectively. This produces the following result -&lt;/p&gt;
        &lt;div id='f2'&gt;
        &lt;p&gt;100&lt;/p&gt;
        &lt;p&gt;1000.0&lt;/p&gt;
        &lt;p&gt;John&lt;/p&gt;
        &lt;/div&gt;
        &lt;h4&gt;Multiple Assignment&lt;/h4&gt;
        &lt;p&gt;Python allows you to assign a single value to several variables simultaneously.&lt;/p&gt;
        &lt;p&gt; For example-&lt;/p&gt;
        &lt;p&gt;a=b=c=1&lt;/p&gt;
        &lt;p&gt;Here, an integer object is created with the value 1, and all the three variables are assigned to the same memory location. You can also assign multiple objects to multiple variables.&lt;/p&gt;
        &lt;p&gt;For example-&lt;/p&gt;
        &lt;p&gt;a, b, c = 1, 2, "john"&lt;/p&gt;
        &lt;p&gt;Here, two integer objects with values 1 and 2 are assigned to the variables a and b respectively, and one string object with the value "john" is assigned to the variable c.
        &lt;/p&gt;
        &lt;p&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id='second'&gt;
        &lt;h2&gt;Standard Data Types&lt;/h2&gt;
        &lt;hr&gt;
        &lt;h4&gt;&lt;/h4&gt;
        &lt;p&gt;The data stored in memory can be of many types. For example, a person's age is stored as a numeric value and his or her address is stored as alphanumeric characters. Python has various standard data types that are used to define the operations possible on them and the storage method for each of them.&lt;/p&gt;
        &lt;p&gt;Python has five standard data types-&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;Numbers&lt;/li&gt;
            &lt;li&gt;String&lt;/li&gt;
            &lt;li&gt;List&lt;/li&gt;
            &lt;li&gt;Tuple&lt;/li&gt;
            &lt;li&gt;Dictionary&lt;/li&gt;
        &lt;ul&gt;
    &lt;/div&gt;
    &lt;div id='third'&gt;
        &lt;h2&gt;Python Numbers&lt;/h2&gt;
        &lt;hr&gt;
        &lt;p&gt;Number data types store numeric values. Number objects are created when you assign a value to them. For example-&lt;/p&gt;
        &lt;p&gt;var1 = 1&lt;/p&gt;
        &lt;p&gt;var2 = 10 &lt;/p&gt;
        &lt;p&gt;You can also delete the reference to a number object by using the del statement. The syntax of the del statement is − &lt;/p&gt;
        &lt;p&gt;del var1[,var2[,var3[....,varN]]]] &lt;/p&gt;
        &lt;p&gt;You can delete a single object or multiple objects by using the del statement. &lt;/p&gt;
        &lt;p&gt;For example- &lt;/p&gt;
        &lt;p&gt;del var &lt;/p&gt;
        &lt;p&gt;del var_a, var_b&lt;/p&gt;
        &lt;p&gt;Python supports three different numerical types -&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;int (signed integers)&lt;/li&gt;
            &lt;li&gt;float (floating point real values)&lt;/li&gt;
            &lt;li&gt;complex (complex numbers)&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;All integers in Python 3 are represented as long integers. Hence, there is no separate number type as long.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id='fourth'&gt;
        &lt;h4&gt;Python Strings&lt;/h4&gt;
        &lt;hr&gt;
        &lt;p&gt;Strings in Python are identified as a contiguous set of characters represented in the quotation marks. Python allows either pair of single or double quotes. Subsets of strings can be taken using the slice operator ([ ] and [:] ) with indexes starting at 0 in the beginning of the string and working their way from -1 to the end.&lt;/p&gt;
        &lt;p&gt;The plus (+) sign is the string concatenation operator and the asterisk (*) is the repetition operator. For example-&lt;/p&gt;
        &lt;div id='f1'&gt;
            &lt;p&gt;str = 'Hello World!'&lt;/p&gt;
            &lt;p&gt;print (str)&lt;/p&gt;
            &lt;p&gt;print (str[0])&lt;/p&gt;
            &lt;p&gt;print (str[2:5])&lt;/p&gt;
            &lt;p&gt;print (str[2:])&lt;/p&gt;
            &lt;p&gt;print (str * 2)&lt;/p&gt;
            &lt;p&gt;print (str + "TEST")&lt;/p&gt;
        &lt;/div&gt;
        &lt;p&gt;This will produce the following result-&lt;/p&gt;
        &lt;div id='f1'&gt;
            &lt;p&gt;Hello World!&lt;/p&gt;
            &lt;p&gt;H&lt;/p&gt;
            &lt;p&gt;llo&lt;/p&gt;
            &lt;p&gt;llo World!&lt;/p&gt;
            &lt;p&gt;Hello World!Hello World!&lt;/p&gt;
            &lt;p&gt;Hello World!TEST&lt;/p&gt;
        &lt;/div&gt;
     &lt;/div&gt;
     &lt;div id='five'&gt;
        &lt;h4&gt;Python Lists&lt;/h4&gt;
        &lt;hr&gt;
        &lt;p&gt;Lists are the most versatile of Python's compound data types. A list contains items separated by commas and enclosed within square brackets ([]). To some extent, lists are similar to arrays in C. One of the differences between them is that all the items belonging to a list can be of different data type.
        &lt;/p&gt;
        &lt;p&gt;The values stored in a list can be accessed using the slice operator ([ ] and [:]) with indexes starting at 0 in the beginning of the list and working their way to end -1. The plus (+) sign is the list concatenation operator, and the asterisk (*) is the repetition operator. For example-&lt;/p&gt;
        &lt;div id='f1'&gt;
            &lt;p&gt;list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]&lt;/p&gt;
            &lt;p&gt;tinylist = [123, 'john']&lt;/p&gt;
            &lt;p&gt;print (list)&lt;/p&gt;
            &lt;p&gt;print (list[0])&lt;/p&gt;
            &lt;p&gt;print (list[1:3])&lt;/p&gt;
            &lt;p&gt;print (list[2:])&lt;/p&gt;
            &lt;p&gt;print (tinylist * 2)&lt;/p&gt;
            &lt;p&gt;print (list + tinylist)&lt;/p&gt;
        &lt;/div&gt;
        &lt;p&gt;This produces the following result-&lt;/p&gt;
        &lt;div id='f1'&gt;
            &lt;p&gt;['abcd', 786, 2.23, 'john', 70.200000000000003]&lt;/p&gt;
            &lt;p&gt;abcd&lt;/p&gt;
            &lt;p&gt;[786, 2.23]&lt;/p&gt;
            &lt;p&gt;[2.23, 'john', 70.200000000000003]&lt;/p&gt;
            &lt;p&gt;[123, 'john', 123, 'john']&lt;/p&gt;
            &lt;p&gt;['abcd', 786, 2.23, 'john', 70.200000000000003, 123, 'john']&lt;/p&gt;
        &lt;/div&gt; 
     &lt;/div&gt;
     &lt;div id='six'&gt;
        &lt;h4&gt;Python Tuples&lt;/h4&gt;
        &lt;hr&gt;
        &lt;p&gt;A tuple is another sequence data type that is similar to the list. A tuple consists of a number of values separated by commas. Unlike lists, however, tuples are enclosed within parenthesis.&lt;/p&gt;
        &lt;p&gt;The main difference between lists and tuples is- Lists are enclosed in brackets ( [ ] ) and their elements and size can be changed, while tuples are enclosed in parentheses ( ( ) ) and cannot be updated. Tuples can be thought of as read-only lists. For example-&lt;/p&gt;
        &lt;div id='f1'&gt;
            &lt;p&gt;tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )&lt;/p&gt;
            &lt;p&gt;tinytuple = (123, 'john')&lt;/p&gt;
            &lt;p&gt;print (tuple)&lt;/p&gt;
            &lt;p&gt;print (tuple[0])&lt;/p&gt;
            &lt;p&gt;print (tuple[1:3])&lt;/p&gt;
            &lt;p&gt;print (tuple[2:])&lt;/p&gt;
            &lt;p&gt;print (tinytuple * 2)&lt;/p&gt;
            &lt;p&gt;print (tuple + tinytuple)&lt;/p&gt;
        &lt;/div&gt;
        &lt;p&gt;This produces the following result-&lt;/p&gt;
        &lt;div id='f1'&gt;
            &lt;p&gt;('abcd', 786, 2.23, 'john', 70.200000000000003)&lt;/p&gt;
            &lt;p&gt;abcd&lt;/p&gt;
            &lt;p&gt;(786, 2.23)&lt;/p&gt;
            &lt;p&gt;(2.23, 'john', 70.200000000000003)&lt;/p&gt;
            &lt;p&gt;(123, 'john', 123, 'john')&lt;/p&gt;
            &lt;p&gt;('abcd', 786, 2.23, 'john', 70.200000000000003, 123, 'john')&lt;/p&gt;
        &lt;/div&gt;
        &lt;p&gt;The following code is invalid with tuple, because we attempted to update a tuple, which is not allowed. Similar case is possible with lists -&lt;/p&gt;
        &lt;div id='f1'&gt;
            &lt;p&gt;tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )&lt;/p&gt;
            &lt;p&gt;list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]&lt;/p&gt;
            &lt;p&gt;tuple[2] = 1000&lt;/p&gt;
            &lt;p&gt;list[2] = 1000&lt;/p&gt;
        &lt;/div&gt;
     &lt;/div&gt;
     &lt;div id='seven'&gt;
        &lt;h4&gt;Python Dictionary&lt;/h4&gt;
        &lt;hr&gt;
        &lt;p&gt;Python's dictionaries are kind of hash-table type. They work like associative arrays or hashes found in Perl and consist of key-value pairs. A dictionary key can be almost any Python type, but are usually numbers or strings. Values, on the other hand, can be any arbitrary Python object.&lt;/p&gt;
        &lt;p&gt;Dictionaries are enclosed by curly braces ({ }) and values can be assigned and accessed using square braces ([]). For example-&lt;/p&gt;
        &lt;div id='f1'&gt;
            &lt;p&gt;dict = {}&lt;/p&gt;
            &lt;p&gt;dict['one'] = "This is one"&lt;/p&gt;
            &lt;p&gt;dict[2]     = "This is two"&lt;/p&gt;
            &lt;p&gt;tinydict = {'name': 'john','code':6734, 'dept': 'sales'}&lt;/p&gt;
            &lt;p&gt;print (dict['one'])&lt;/p&gt;
            &lt;p&gt;print (dict[2])&lt;/p&gt;
            &lt;p&gt;print (tinydict)&lt;/p&gt;
            &lt;p&gt;print (tinydict.keys())&lt;/p&gt;
            &lt;p&gt;print (tinydict.values())&lt;/p&gt;
        &lt;/div&gt;
        &lt;p&gt;This produces the following result-&lt;/p&gt;
        &lt;div id='f1'&gt;
            &lt;p&gt;This is one&lt;/p&gt;
            &lt;p&gt;This is two&lt;/p&gt;
            &lt;p&gt;{'dept': 'sales', 'code': 6734, 'name': 'john'}&lt;/p&gt;
            &lt;p&gt;['dept', 'code', 'name']&lt;/p&gt;
            &lt;p&gt;['sales', 6734, 'john']&lt;/p&gt;
        &lt;/div&gt;
        &lt;p&gt;Dictionaries have no concept of order among the elements. It is incorrect to say that the elements are "out of order"; they are simply unordered.&lt;/p&gt;
      &lt;/div&gt;
      &lt;div id='eight'&gt;
        &lt;h4&gt;Data Type Conversion&lt;/h4&gt;
        &lt;hr&gt;
        &lt;p&gt;Sometimes, you may need to perform conversions between the built-in types. To convert between types, you simply use the type-name as a function.&lt;/p&gt;
        &lt;p&gt;There are several built-in functions to perform conversion from one data type to another. These functions return a new object representing the converted value.&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;b&gt;int(x [,base]): &lt;/b&gt; Converts x to an integer. The base specifies the base if x is a string.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;float(x): &lt;/b&gt; Converts x to a floating-point number.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;complex(real [,imag]) :&lt;/b&gt; Creates a complex number.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;str(x) :&lt;/b&gt; Converts object x to a string representation.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;repr(x) :&lt;/b&gt; Converts object x to an expression string.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;eval(str)&lt;/b&gt; Evaluates a string and returns an object.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;tuple(s) :&lt;/b&gt; Converts s to a tuple.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;list(s) :&lt;/b&gt; Converts s to a list.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;set(s) :&lt;/b&gt; Converts s to a set.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;dict(d) :&lt;/b&gt; Creates a dictionary. d must be a sequence of (key,value) tuples.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;frozenset(s) :&lt;/b&gt; Converts s to a frozen set.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;chr(x) :&lt;/b&gt; Converts an integer to a character.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;unichr(x) :&lt;/b&gt; Converts an integer to a Unicode character.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;ord(x) :&lt;/b&gt; Converts a single character to its integer value.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;hex(x) :&lt;/b&gt; Converts an integer to a hexadecimal string.&lt;/li&gt;
            &lt;li&gt;&lt;b&gt;oct(x) :&lt;/b&gt; Converts an integer to an octal string.&lt;/li&gt;
        &lt;/ul&gt;
     &lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;    
&lt;/html&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGr257-US3BFlIorE_PJ_52C0i86yT6Sj79152lc1BVoU-0akoIv3Kq1gCB5SECbpCqfDavs_OZ2nCWAFR0X0PtI_iN1889tv4Bc-u5yyeCgIhfU4SQy8xWDLHNmjD8vgks6KAQR0Ra3_s/s72-c/1_8J9yViDiXqNYeEWctWkdfQ.jpeg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Decision Making in Python Programs</title><link>https://spyfellow.blogspot.com/2020/11/decision-making-in-python-programs.html</link><category>KNOWLEDGE</category><category>PYTHON</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Sun, 22 Nov 2020 11:35:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-9042630643709764355</guid><description>&lt;p&gt;&lt;strong&gt;Decision making&lt;/strong&gt; structures require that the &lt;strong&gt;programmer&lt;/strong&gt; specifies one or more conditions to be evaluated or tested by the &lt;strong&gt;program&lt;/strong&gt;, along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false.&lt;/p&gt;&lt;p&gt;There come situations in real life when we need to make some decisions and based on these decisions, we decide what should we do next. Similar situations arise in programming also where we need to make some decisions and based on these decisions we will execute the next block of code. For example, in Python if x occurs then execute y else execute z. There can also be multiple conditions like in Python if x occurs then execute p, else if condition y occurs execute q, else execute r. This condition of Python&amp;nbsp; else-if is one of the many ways of importing multiple conditions.&lt;/p&gt;&lt;figure&gt;&lt;img src="https://udemy-images.s3.amazonaws.com:443/redactor/raw/2020-07-25_07-26-41-eae9a3454b7146ab63c7371314c05e51.png" /&gt;&lt;/figure&gt;&lt;p&gt;&lt;strong&gt;if statement in Python:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;if statement is the most simple decision making statement. It is used to decide whether a certain statement or block of statements will be executed or not i.e if a certain condition is true then a block of statement is executed otherwise not.&lt;/p&gt;&lt;p&gt;The &lt;em&gt;if statement&lt;/em&gt; is the simplest example of a decision structure in Python. In an if statement a logical test is made which can evaluate to either true or false. If the result of the test is true, the statements in the &lt;em&gt;if branch&lt;/em&gt; are executed. If the result of the test is false, the statements in the &lt;em&gt;else branch&lt;/em&gt; are executed. Once the statements in the appropriate branch have been executed, the flow of execution continues on to the statements that follow the if statement.&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;if(condition) 
{
   // Statements to execute if
   // condition is true
}
&lt;/pre&gt;&lt;p&gt;Here, &lt;strong&gt;condition &lt;/strong&gt;after evaluation will be either true or false. Python&amp;nbsp; if statement accepts boolean values – if the value is true then it will execute the block of statements below it otherwise not. If we do not provide the curly braces ‘{‘ and ‘}’ after if(condition) then by default if statement will consider the first immediately below statement to be inside its block.&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;a = int ( input ( "Enter a number: " ) )
b = int ( input ( "Enter another number: " ) )
if a &amp;gt; b :
    print ( "First number is greater than second number " )&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;if-else in Python&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The &lt;em&gt;if &lt;/em&gt;statement alone tells us that if a condition is true it will execute a block of statements and if the condition is false it won’t. But what if we want to do something else if the condition is false. Here comes the Python&amp;nbsp; &lt;em&gt;else &lt;/em&gt;statement. We can use the &lt;em&gt;else &lt;/em&gt;statement with &lt;em&gt;if &lt;/em&gt;statement to execute a block of code when the condition is false.&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;if (condition)
{
    // Executes this block if
    // condition is true
}
else
{
    // Executes this block if
    // condition is false
}&lt;/pre&gt;&lt;pre class="prettyprint linenums"&gt;a = int ( input ( "Enter a number: " ) )
b = int ( input ( "Enter another number: " ) )
if a &amp;gt; b :
    print ( "First number is greater than second number " )
else :
    print ( "Second number is greater than first number " )&lt;/pre&gt;&lt;h4&gt;Nested if statements&lt;/h4&gt;&lt;p&gt;An if statement gives us the ability to ask a single question and do something in response to that question. Often, the logic of a particular situation will dictate that we ask more than one question to resolve a situation. In that case, we may need to make use of a &lt;em&gt;nested if&lt;/em&gt;. The following example demonstrates how this works in practice. The program below has the user enter three floating point numbers that form the coefficients of a polynomial &lt;em&gt;p&lt;/em&gt;(&lt;em&gt;x&lt;/em&gt;) = &lt;em&gt;a&lt;/em&gt; &lt;em&gt;x&lt;/em&gt;2 + &lt;em&gt;b&lt;/em&gt; &lt;em&gt;x&lt;/em&gt; + &lt;em&gt;c&lt;/em&gt;. The program will then try to determine what kind of roots the polynomial has.&lt;/p&gt;&lt;p&gt;The key decision that has to be made is based on the value of the descriminant, &lt;em&gt;b&lt;/em&gt;2 - 4 &lt;em&gt;a&lt;/em&gt; &lt;em&gt;c&lt;/em&gt;. If that quantity is negative, the polynomial has no real roots. If it 0, the equation has one real root, and if it is greater than 0 there are two distinct real roots. The program below uses a pair of nested if statements to determine which of these three cases we are dealing with.&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;a = input("Enter a number: ")
b = input("Enter another number: ")
if a&amp;gt;b:
    print("First number is greater then Second number")
elif a==b:
    print("Both number is equal")
else:
    print("Second number is greater than First number")&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Difference Between a program and a Script</title><link>https://spyfellow.blogspot.com/2020/11/difference-between-program-and-script.html</link><category>KNOWLEDGE</category><category>TECHNOLOGY</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Sun, 22 Nov 2020 11:25:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-2357174244870604067</guid><description>&lt;h4&gt;&lt;strong&gt;What is Difference Between a program and a Script&lt;/strong&gt;&lt;/h4&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Basically, all scripting languages are programming languages. The theoretical difference between the two is that scripting languages do not require the compilation step and are rather interpreted. For example, normally, a C program needs to be compiled before running whereas normally, a scripting language like JavaScript or PHP need not be compiled.&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOe48-oNbvwnfGJTLc4XwuVvNWrBJ-awvdD0pzH_Kq6nQwsqIggsgcU0F0R1e2F-ECCHLsEVWZ9ustkoVo1gM2p68zRVaOz_i8RUr-Gy1ujaGzIf7-U7Tjh0Ctg36LCnhJj_1N2fZk93WJ/s2048/mahmudul-hasan-shaon-QTPJWJBQO90-unsplash.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1356" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOe48-oNbvwnfGJTLc4XwuVvNWrBJ-awvdD0pzH_Kq6nQwsqIggsgcU0F0R1e2F-ECCHLsEVWZ9ustkoVo1gM2p68zRVaOz_i8RUr-Gy1ujaGzIf7-U7Tjh0Ctg36LCnhJj_1N2fZk93WJ/s16000/mahmudul-hasan-shaon-QTPJWJBQO90-unsplash.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h4&gt;What is a Scripting Language?&lt;/h4&gt;&lt;p&gt;Scripting languages, as the name suggests, is a programming language that supports scripts. A scripting language binds a set of software components that collaborate to solve a particular problem. Scripting assumes the existence of powerful components and provides the means to connect them together. Scripting languages are glue languages that integrate the execution of system utilities including compilers; command line interpretation; shell-based programming; and execution of codes written in web-based languages. The purpose of a scripting language is the development of applications by plugging existing components together and they generally favor high-level programming over execution speed. Scripting is used in a variety of applications, and scripting languages are correspondingly diverse. Python is a powerful scripting language for complex system involving operating system, networks, and web-based programming.&lt;/p&gt;&lt;h4&gt;What is a Programming Language?&lt;/h4&gt;&lt;p&gt;A programming language is an organized way of communicating with a computer, such that the computer behaves according to the instructions given by the programmer. A programming language is an artificial formalism in which algorithms can be expressed. In the modern era, the problems to be solved by computers lie in different problem domains such as scientific computing, database programming, business applications, process automation, and web-based applications. All these domains are quite different with varied requirements. A programming language is a specific set of instructions given to a computer in a language that the computer understands to perform specific tasks. Today’s programming languages are the product of development that started in the 1950s. The term programming languages usually refer to high-level languages such as C++, Java, Ada, Pascal, and FORTRAN.&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNTbfZDhd60JyMEp-LbXvGbwSCrb7u8dcAeT8EJB_wX1dKcAYo63ctfy1qRGC5qHWMs0YXGvLBs8LMmMYZu8-1SKDt6t1cvdaqxWJ6A55DhbK5Y_bNduBoP2E63gKSf9Kj4EPf5YmZLzsi/s2048/fotis-fotopoulos-SyvsTmuuZyM-unsplash.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1324" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNTbfZDhd60JyMEp-LbXvGbwSCrb7u8dcAeT8EJB_wX1dKcAYo63ctfy1qRGC5qHWMs0YXGvLBs8LMmMYZu8-1SKDt6t1cvdaqxWJ6A55DhbK5Y_bNduBoP2E63gKSf9Kj4EPf5YmZLzsi/s16000/fotis-fotopoulos-SyvsTmuuZyM-unsplash.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Script&lt;/strong&gt; :&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;"Scripts" are distinct from the core code of the application, which is usually written in a different language, and are often created or at least modified by the end-user.&lt;br /&gt;Scripts are often interpreted from source code or bytecode, whereas the applications they control are traditionally compiled to native machine code.&lt;/p&gt;&lt;p&gt;A &lt;strong&gt;script&lt;/strong&gt; may refer to any of the following:&lt;/p&gt;&lt;p&gt;1. A script or scripting language is a computer language with a series of commands within a file that is capable of being executed without being compiled. Good examples of server-side scripting languages include Perl, PHP, and Python. The best example of a client side scripting language is JavaScript. A full list of scripting languages and other programming languages can be found through our programming language definition.&lt;/p&gt;&lt;h4&gt;Advantages of scripts&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Open source, allowing users to view and edit the &lt;strong&gt;script&lt;/strong&gt; if needed.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Does not require the file to be compiled, but may be when necessary.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Easy to learn and write.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Easy to port between different operating systems.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Much faster to develop than an actual program - some individuals and companies write scripts as a prototype for actual programs.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Disadvantages of scripts&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Open source, allows others to view source code, which may be prohibited by some companies.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Requires the user to install an interpreter or separate program before the script can be run.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;In some situations, they may be slower than a compiled program.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;strong&gt;Program&lt;/strong&gt; :&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;The program has an executable form that the computer can use directly to execute the instructions.&lt;br /&gt;The same program in its human-readable source code form, from which executable programs are derived &lt;em&gt;(e.g., compiled)&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h4&gt;&lt;strong&gt;Scripts vs Programs&lt;/strong&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;It is important to understand the difference between a "script" and a "real program", and which languages are appropriate for each.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Scripts tend to be small (no more than a few hundred or a few thousand lines of code) and do not do any significant computation of their own.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Instead, scripts run "real programs" to do most of the computational work. The job of the script is simply to automate and document the process of running programs.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;As a result, scripting languages do not need to be efficient and are generally interpreted rather than compiled. ( Interpreted language programs run an order of magnitude or more slower than equivalent compiled programs, unless most of their computation is done by built-in, compiled subprograms. )&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Real programs may be quite large and may implement complex computational algorithms. Hence, they need to be fast and as a result are usually written in compiled languages.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;If you plan to use exclusively pre-existing programs such as Unix commands and/or add-on application software, and need only automate the execution of these programs, then you need to write a script and should choose a good scripting language.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;If you plan to implement your own algorithm(s) that may require a lot of computation, then you need to write a program and should select an appropriate compiled programming language&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOe48-oNbvwnfGJTLc4XwuVvNWrBJ-awvdD0pzH_Kq6nQwsqIggsgcU0F0R1e2F-ECCHLsEVWZ9ustkoVo1gM2p68zRVaOz_i8RUr-Gy1ujaGzIf7-U7Tjh0Ctg36LCnhJj_1N2fZk93WJ/s72-c/mahmudul-hasan-shaon-QTPJWJBQO90-unsplash.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How to install Python on Linux</title><link>https://spyfellow.blogspot.com/2020/11/how-to-install-python-on-linux.html</link><category>LINUX</category><category>PYTHON</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Tue, 17 Nov 2020 18:43:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-8855522378276944770</guid><description>&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/VbRHuVflx4o?autoplay=1" width="560"&gt;&lt;/iframe&gt;

&lt;h4&gt;Installing Python 3.8 on Ubuntu with Apt&lt;/h4&gt;&lt;p&gt;Installing Python 3.8 on Ubuntu with apt is a relatively straightforward process and takes only a few minutes:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Run the following commands as root or user with sudo access to update the packages list and install the prerequisites:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;sudo apt updatesudo apt install software-properties-common&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Add the deadsnakes PPA to your system’s sources list:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;sudo add-apt-repository ppa:deadsnakes/ppa&lt;/pre&gt;&lt;p&gt;When prompted press &lt;code&gt;Enter&lt;/code&gt; to continue:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;Press [ENTER] to continue or Ctrl-c to cancel adding it.&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Once the repository is enabled, install Python 3.8 with:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;sudo apt install python3.8&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Verify that the installation was successful by typing:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;python3.8 --version&lt;/pre&gt;&lt;pre class="prettyprint linenums"&gt;Python 3.8.0&lt;/pre&gt;&lt;p&gt;At this point, Python 3.8 is installed on your Ubuntu system, and you can start using it.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;__________________________________________________________________&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Installing Python 3.8 on Ubuntu from Source&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;In this section, we’ll explain how to compile Python 3.8 from the source.&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Update the packages list and install the packages necessary to build Python:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;sudo apt updatesudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Download the latest release’s source code from the Python download page using &lt;a href="https://linuxize.com/post/wget-command-examples/" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;wget&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz&lt;/pre&gt;&lt;p&gt;At the time of writing this article, the latest release is &lt;code&gt;3.8.0&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;When the download finishes,:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;tar -xf Python-3.8.0.tgz&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="https://linuxize.com/post/linux-cd-command/" rel="noopener noreferrer" target="_blank"&gt;Switch&lt;/a&gt; to the Python source directory and execute the &lt;code&gt;configure&lt;/code&gt; script which performs a number of checks to make sure all of the dependencies on your system are present:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;cd Python-3.8.0./configure --enable-optimizations&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;--enable-optimizations&lt;/code&gt; option optimizes the Python binary by running multiple tests. This makes the build process slower.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Start the Python 3.8 build process:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;make -j 8&lt;/pre&gt;&lt;p&gt;For faster build time, modify the &lt;code&gt;-j&lt;/code&gt; to correspond to the number of cores in your processor. You can find the number by typing &lt;code&gt;nproc&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;When the build process is complete, install the Python binaries by typing:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;sudo make altinstall&lt;/pre&gt;&lt;p&gt;Do not use the standard &lt;code&gt;make install&lt;/code&gt; as it will overwrite the default system python3 binary.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;That’s it. Python 3.8 has been installed and ready to be used. Verify it by typing:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;python3.8 --version&lt;/pre&gt;&lt;p&gt;The output should show the Python version:&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;Python 3.8.0&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/VbRHuVflx4o/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Python3 Vs Python2</title><link>https://spyfellow.blogspot.com/2020/11/python3-vs-python2.html</link><category>PYTHON</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Mon, 16 Nov 2020 19:46:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-2930304066495086899</guid><description>&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/VbRHuVflx4o?autoplay=1" width="560"&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;If you’re new to Python perhaps you’ve heard there are two major versions out in the wild: Python 2 and Python 3. So which should you learn and why is there a debate about this?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;It’s understandable that porting large existing code bases to a new version is a prospect which sends a shiver down many a developer’s spine. Python 3 was released to fix problems present in Python 2. The nature of these changes meant that Python 3 was incompatible with Python 2. It also meant that Python 3 did not carry forward the problems of Python 2. Some aspects of Python 3 have been back ported to Python 2.6 and 2.7 to make the migration to Python 3 easier.Python 2 was supposed to be retired in 2015 but slow adoption of Python 3 led to an extended deadline of 2020. Python 2.7 will receive updates till 2020 for security and bug fixes only.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;span style="color: #2b00fe; font-size: large;"&gt;I am new to Python. Should I learn Python 2 or Python 3?&lt;/span&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;Python 3 fixes many of the problems that are present in Python 2. Python 3 is also the future of the language since Python 2 will be retired in 2020. It's therefore recommended that beginners learn Python 3. Moreover, if you're going to write new code.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;If you've to maintain legacy Python 2 code, it's still best to learn Python the right way from Python 3. Then you can study the differences between Python 2 and 3. The point is that the two versions are much more similar than different.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;Users who are new to use Python may get confused about the different versions available in today’s market. Though Python 3 is the latest version, still there are few developers using Python 2. You can see advantages in both the versions and utilize those based on the requirement. Now let us see the details on Python2 Vs Python 3.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: red; font-size: large;"&gt;&lt;u&gt;Why Python 3?&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;The answer I give most people is because Python 2 has been end-of-life’d. The people that work directly on Python have decided that there won’t ever be a Python 2.8. They also decided that Python 2.7, from now on, will only get security updates from the Python 3 development branch. No new features unless someone wants to spend the extra required time to back port them. Thankfully, several people are willing to do this. This has given us the amazing &lt;code&gt;__future__&lt;/code&gt; module full of Python 3 goodies, but that’s not the same as using them natively.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;Another, somewhat embarrassing reason, is that I hadn’t had a lot of pure Python 3 experience. I wanted to be able to learn more of the newest version of my favorite language. Python 3 scared me when I first looked at it a year or so ago. It seemed like a big change for no real gain and I had visions of having to rewrite everything I had done to support this new interpreter. I was so wrong.&lt;/span&gt;&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="color: red;"&gt;Python 3.0 – Released in the year 2008
Python 3.6 – Released in the year 2016
Python 3.7 under development
Python 3 is to manage the design defects in the earlier versions
Python 3 syntax is simple and easy to understand
Python 3 Print syntax is plainly treated as a function.
Example: print “hello”
In Python 3, dividing two (2) integers result in an integer value
3.0/2.0= 1.5
Libraries are being developed and they are made strict to use with Python 3
Here range does what xrange does in Python 2.7 and xrange function is not available
For-loop variable does not leak into the global namespace
Python 3 has only one input taking method which is input(). raw_input() is not available in Python 3. In case to use raw_input() like Python 2, make use of eval () method
Rules of ordering comparisons in Python 3 have been made simpler&lt;/span&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/lUrjP3oAgp4?autoplay=1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen&gt;&lt;/iframe&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #990000; font-size: large;"&gt;Why you must learn Python 2? &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;Even though, Python 2 is known to be the old version of open source where you will still need to learn Python 2. For becoming the DevOps engineer and you should also work with the different configurations management tools such as Ansible and puppet. Here, you should also work with both available versions. If the company’s code is written in Python 2, you need to learn to work for it. If the entire development team is perfectly working on the project which depends on particular third-party libraries and the third party software that you are not capable of port and Python 3, so Python 2 is an only available option for the user.&lt;/span&gt;&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;&lt;span style="font-size: medium;"&gt;There's ASCII str type and unicode type, but no separate type to handle bytes of data
Two types of integers: C-based integers (int) and Python long integer (long)
Return type of division is int if operands are integers: 5 / 4 gives 1; 4 / 2 gives 2
round(16.5) returns a float of value 16.0
Unorderable types can be compared
print is a statement: print "Hello World!"
range() returns a list of numbers while xrange() returns an object for lazy evaluation
Functions/methods map(), filter(), zip(), dict.items(), dict.keys(), dict.values() return lists
raw_input() returns input as str and input() evaluates the input as a Python expression
Raising exceptions: raise IOError("file error") or raise IOError, "file error"
Handling exceptions: except NameError, err: or except (TypeError, NameError), err:
On generators, a method or function call: g.next() or next(g)
Loop variables in a comprehension leak to global namespace
&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="color: red; font-size: large;"&gt;Which Python Version you should Use?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt; When it is about the comparison of Python 2 version and the 3 today, Also, Python 3 is an outright winner. The reason is simple that Python 2 will be available after the year 2020. Even the adoption of Mass Python 3 is also a clear direction of the future. After considering declining any kind of support for Python 2 programming language along with the additional benefits from the upgrades to Python 3, it is usually advisable for the developer to choose Python version 3. On the other hand, if the job demands the capabilities of Python 2, this would be just a compelling reason for using this version.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;Main differences&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;While Python 2 and 3 are quite similar, there are notable differences in code handling and syntax. You should not assume that code written in Python 2 will work smoothly in Python 3 or vice versa.&lt;/span&gt;&lt;/p&gt;&lt;h4&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-size: medium;"&gt;Print&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;In Python 2, &lt;code&gt;print&lt;/code&gt; is a statement not a function. You use it as follows:&lt;/span&gt;&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;&lt;span style="font-size: medium;"&gt;print "I'm a print statement in Python 2"
&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;In Python 3, &lt;code&gt;print()&lt;/code&gt; is explicitly treated as a function, so we use standard function syntax:&lt;/span&gt;&lt;/p&gt;&lt;pre class="prettyprint linenums"&gt;&lt;span style="font-size: medium;"&gt;print("I'm a print statement in Python 3")
&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-size: medium;"&gt;Note that Python 3’s &lt;code&gt;print()&lt;/code&gt; syntax is backwards-compatible with Python 2.7, so a Python 3 &lt;code&gt;print()&lt;/code&gt; function will run in either version.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/VbRHuVflx4o/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Nmap &amp; Zenmap</title><link>https://spyfellow.blogspot.com/2020/08/nmap-zenmap.html</link><category>HACKING</category><category>LINUX</category><category>TECHNOLOGY</category><category>WINDOW</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Fri, 28 Aug 2020 01:18:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-7340967190082837734</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;span style="color: red; font-size: x-large;"&gt;Watch out this video for practical Knowledge:-&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;iframe __idm_id__="703078401" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/jn9P4E8iH6U?autoplay=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: red; font-size: x-large;"&gt;Nmap:-&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue; font-size: large;"&gt;Nmap is free and is one of the most powerful network scanning tools available for both&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue; font-size: large;"&gt;Windows and Linux platforms. Nmap can help both network administrators and&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue; font-size: large;"&gt;cybersecurity professionals in many ways.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: lime; font-size: x-large;"&gt;Features:-&lt;/span&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;span style="color: blue; font-size: large;"&gt;Creating a network inventory&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: blue; font-size: large;"&gt;Checking for live hosts&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: blue; font-size: large;"&gt;Determining operating systems&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: blue; font-size: large;"&gt;Determining running services and their version&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: blue; font-size: large;"&gt;Identifying vulnerabilities on a host&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: blue; font-size: large;"&gt;Detecting sniffers&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: blue; font-size: large;"&gt;Determining whether a firewall is present on a network&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="color: blue; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: red; font-size: x-large;"&gt;Zenmap:-&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue; font-size: large;"&gt;Zenmap is the graphical user interface (GUI) version of Nmap and is supported on&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue; font-size: large;"&gt;multiple platforms, such as Windows, Linux, and macOS. The creation of Zenmap was&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue; font-size: large;"&gt;geared toward beginners as it's easier to use than the traditional command-line interface of&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;&lt;span style="color: blue;"&gt;Nmap. To download Zenmap on your system, please visit&lt;/span&gt;&lt;span style="background-color: lime;"&gt;&lt;a href="https://nmap.org/zenmap/" target="_blank"&gt; https://nmap.org/zenmap/&lt;/a&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt; .&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: large;"&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: blue; font-size: large;"&gt;The following shows the Zenmap interface. It's quite simple to use: simply enter the target&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue; font-size: large;"&gt;and select the type of scan you would like to perform. Depending on the type of scan you&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue; font-size: large;"&gt;select, the necessary Nmap operators will be set in the command field.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: blue; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: purple; font-size: x-large;"&gt;For better understanding go for the Video.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/jn9P4E8iH6U/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Nmap </title><link>https://spyfellow.blogspot.com/2020/08/nmap.html</link><category>HACKING</category><category>LINUX</category><category>TECHNOLOGY</category><category>WINDOW</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Tue, 25 Aug 2020 16:01:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-8266043420006901304</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;span style="background-color: lime; color: red; font-size: x-large;"&gt;For Practical Watch Video here:-&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe __idm_id__="190882817" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/dCS_qtQsdUs?autoplay=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: x-large;"&gt;&lt;span style="background-color: cyan; color: red;"&gt;Nmap&lt;/span&gt;:-&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;Nmap is free and is one of the most powerful network scanning tools available for both&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;Windows and Linux platforms. Nmap can help both network administrators and&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;cybersecurity professionals in many ways.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="color: blue; font-size: large;"&gt;Nmap features include the following:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;Creating a network inventory&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;Checking for live hosts&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;Determining operating systems&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;Determining running services and their version&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;Identifying vulnerabilities on a host&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;Detecting sniffers&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;Determining whether a firewall is present on a network&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: large;"&gt;The basics of Nmap and move gradually on to advanced&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;scanning techniques. As penetration testers, we must ensure that we have an arsenal of&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;tools that will help us to perform our jobs efficiently. However, as professionals, we must&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;also ensure that we are very familiar with, and know how to use, each tool available to us.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="background-color: lime; font-size: large;"&gt;Watch out the video to know how Nmap Works.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/dCS_qtQsdUs/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Google hacking and search operators</title><link>https://spyfellow.blogspot.com/2020/08/google-hacking-and-search-operators.html</link><category>HACKING</category><category>LINUX</category><category>TECHNOLOGY</category><category>WINDOW</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Sun, 23 Aug 2020 09:44:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-5419745562934626433</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;iframe __idm_id__="632554497" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/WBFVUh5lmMk?autoplay=1" width="560"&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;span style="font-size: large;"&gt;The concept of Google hacking is not actually hacking into Google's network infrastructure&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;or systems, but rather using advanced search parameters within the Google search engine.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;We can use Google to help us find vulnerable systems, hidden information, and resources&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;on the internet by simply inserting special search operators in the Google search bar.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-size: large;"&gt;Let's imagine that you would like to use the Google search engine to look for various&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;websites, but you don't want to see results that contain certain keywords or phrases. We&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;can use the&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: red;"&gt;&amp;lt;string of text here&amp;gt; -&amp;lt;keyword&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;syntax to do this. The keyword is the&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;phrase or text that you want to exclude.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-size: large;"&gt;The following table is a brief list of Google search operators, also known as Google dorks,&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;that can help you find sensitive information on the internet:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidOSlmHi3X9NzXeai1a0l82FHj5e0LZkoB7zhZ6J8DlxwII-4SyHojptsNUQ1n3QCACQbNqoAK8MdZYQUCNeKxEy_FNRRBLqinzI2cm7Bv9wwvXP2oP0OcJAjGn4NS6HgBIVQOn5SHGdbj/s1600/h.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="460" data-original-width="856" height="343" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidOSlmHi3X9NzXeai1a0l82FHj5e0LZkoB7zhZ6J8DlxwII-4SyHojptsNUQ1n3QCACQbNqoAK8MdZYQUCNeKxEy_FNRRBLqinzI2cm7Bv9wwvXP2oP0OcJAjGn4NS6HgBIVQOn5SHGdbj/s640/h.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/WBFVUh5lmMk/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Setting Up Kali Linux</title><link>https://spyfellow.blogspot.com/2020/08/setting-up-kali-linux.html</link><category>HACKING</category><category>LINUX</category><category>TECHNOLOGY</category><category>WINDOW</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Sat, 22 Aug 2020 20:49:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-9214844107812379175</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="color: red; font-size: x-large;"&gt;For practical Watch out this Video..&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: red; font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;iframe __idm_id__="428737537" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/wZ69L683wX4?autoplay=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;As a future ethical hacker and/or penetration tester, it is quite important when testing&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;payloads or practicing hacking skills that you do not disrupt or cause any sort of harm or&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;damage to other people's computers or network infrastructure, such as that of your&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;organization. To elaborate further, we'll use a simple analogy. Imagine you work for a&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;company called ACME (a fictional organization) and you're the network/system&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;administrator. Your IT director has noticed you express an interest in cybersecurity and&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;that you have significant potential in becoming a penetration tester or an ethical hacker.&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;They, therefore, approve official training in penetration testing certification for you. Once&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;the training has ended, access to the virtual labs through the Authorized Training Centre&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;(ATC) is usually terminated, which poses a real challenge for you: how are you going to&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;practice your hacking skills when the training course and lab access has ended? Another&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;challenge is the fact that practicing hacking techniques on an organization's network is&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;intrusive and illegal.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;This brings us to the importance of building our own personal lab environment for&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;practicing and improving our skill set. Furthermore, having our own penetration testing lab&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;will allow us to try new attacks, tools, and techniques without worrying about being&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;intrusive or creating a security breach in a company network. Most importantly,&lt;/span&gt;&lt;span style="font-size: large;"&gt;&amp;nbsp;you will learn about the importance of building and designing a&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;suitable penetration testing lab for practicing various hacking techniques on Windows and&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;Linux operating systems.&lt;/span&gt;&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/wZ69L683wX4/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Footprinting &amp; Reconnaissance </title><link>https://spyfellow.blogspot.com/2020/08/footprinting-reconnaissance.html</link><category>HACKING</category><category>LINUX</category><category>PYTHON</category><category>TECHNOLOGY</category><category>WINDOW</category><author>noreply@blogger.com (Vipul's Blog)</author><pubDate>Thu, 20 Aug 2020 20:19:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8831512390223230441.post-3717171739078133071</guid><description>&lt;iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/3NmYmVsqFNA?autoplay=1" width="560"&gt;&lt;/iframe&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: xx-large;"&gt;Footprinting:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: xx-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-large;"&gt;Footprinting is the procedure whereby as much information as possible is gathered in&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;relation to a target. In footprinting, the objective is to obtain specific details about the target,&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;such as its operating systems and the service versions of running applications. The&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;information that's collected can be used in various ways to gain access to the target system,&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;network, or organization. Footprinting allows a penetration tester to understand the&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;security posture of the target infrastructure, quickly identify security vulnerabilities on the&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-large;"&gt;target systems and networks, create a network map of the organization, and reduce the area&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;of focus to the specific IP addresses, domain names, and the types of devices regarding&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-large;"&gt;which information is required.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;

&lt;iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/1xxRM72d5-I?autoplay=1" width="560"&gt;&lt;/iframe&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: xx-large;"&gt;Reconnaissance:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-large;"&gt;From a military perspective, reconnaissance is the observation and research of an enemy&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;target. In cybersecurity, as a penetration tester, we use various tools and techniques to&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;gather detailed information about a target organization and its underlying infrastructure.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-large;"&gt;Reconnaissance is vital in the field of penetration testing. As a penetration tester, we&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;definitely need to know about our target, as well as its vulnerabilities and operating&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;systems, before we attempt to gain access via exploitation. The information gathered&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;during the reconnaissance phase will help us to choose the right tools and techniques to&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-large;"&gt;successfully exploit the target.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://img.youtube.com/vi/3NmYmVsqFNA/default.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>