PyWebIO – Helps to build webapps in Python. The main advantage is that no javascript nor the front end code is required. Refer to this site for more information on PyWebIO – https://www.pyweb.io/index.html Let’s see how to create our first web application using PyWebIO.
Category Archives: Uncategorized
Functions
Functions are logical grouping of code statements that collectively performs a specific operation or a specific requirement. Example: If I am building a calculator, a calculator can perform various mathematical operations like addition, subtraction, division, etc. I can create one function for addition, one function for subtraction, one function for division, and so on. Let’sContinue reading “Functions”
Tuples
Tuple is a collection which contains items that can be ordered and will allow duplicate items. Tuples can’t be changeable and it is written within round brackets. Example: This above example defines tuple named myFirstTuple. Accessing tuple items is similar to accessing list items using indexes. Example: Output: Since, Tuple is non-changeable, we can’t addContinue reading “Tuples”
Data Type – List
List is a collection which contains objects or items that can be changed and ordered. Note: List can allow duplicate members. Below is the sample code which creates the list name “firstList” and displays the list. In Python, lists are written inside a square bracket. When we print the list, we get the below output:Continue reading “Data Type – List”
Complex Number
A Complex number is a combination of real number and an imaginary number. For example: 3 + 2i –> This is a complex number in which 3 is the real number and 2i is the imaginary number. i –> is the imaginary number that is imagined as the square root of -1 i.e., √-1. BelowContinue reading “Complex Number”
Comments in Python
Comments are statements that is written inside a code which is used mostly for adding the note about the code. Comments doesn’t gets executed. It is basically ignored by the compiler. Comments are added to increase the code readability and maintainability. There are specific syntax that needs to be followed to write comments. Single lineContinue reading “Comments in Python”
Variables in Python
Variable creation in Python is very much similar to the other programming languages. However, there are few notable differences. Variables are created only when it is assigned with a value. There is no concept of declaration. Variables type are determined only when it is assigned with a value. Type is optional while creating variables. TypesContinue reading “Variables in Python”
Indentation in Python
Indentation plays a major role in Python. Let’s see with example. Here is a sample code of if block without space: This says to print “Hello from Python” whenever it executes and both the code statements are aligned to each other. The Python interpreter will not know that the print statement should be executed wheneverContinue reading “Indentation in Python”