Operators in Python

Operators are some special symbols with the help of these symbols we perform logical and arithmetic operations.

On which variables operation are performed are called operands

example :-

# (+) is operator and, a and b are operands on which operation are perform
a = 5
b = 4
c = a + b
print(c)
Python
 
 
 
Following are some common operators in python are:-

1 – Arithmetic Operator

Arithmetic operators are used to perform mathematical operations like addition, subtraction, multiplication, etc.

OperatorMeaningExample
+Add two operands or unary plusx + y+ 2
Subtract right operand from the left or unary minusx – y- 2
*Multiply two operandsx * y
/Divide left operand by the right one (always results into float)x / y
%Modulus – remainder of the division of left operand by the rightx % y (remainder of x/y)
//Floor division – division that results into whole number adjusted to the left in the number linex // y
**Exponent – left operand raised to the power of rightx**y (x to the power y)

Example 1: Arithmetic operators in Python

x = 15
y = 4

# Output: x + y = 19
print('x + y =',x+y)

# Output: x - y = 11
print('x - y =',x-y)

# Output: x * y = 60
print('x * y =',x*y)

# Output: x / y = 3.75
print('x / y =',x/y)

# Output: x // y = 3
print('x // y =',x//y)

# Output: x ** y = 50625
print('x ** y =',x**y)
Markup
 

Output :-

x + y = 19

x - y = 11

x * y = 60

x / y = 3.75

x // y = 3

x ** y = 50625
Markup
 
 

Comparison operators

Comparison operators are used to compare values. It returns either True or False according to the condition.

OperatorMeaningExample
>Greater than – True if left operand is greater than the rightx > y
<Less than – True if left operand is less than the rightx < y
==Equal to – True if both operands are equalx == y
!=Not equal to – True if operands are not equalx != y
>=Greater than or equal to – True if left operand is greater than or equal to the rightx >= y
<=Less than or equal to – True if left operand is less than or equal to the rightx <= y

Example 2: Comparison operators in Python

 
 
x = 10
y = 12

# Output: x > y is False
print('x > y is',x>y)

# Output: x < y is True
print('x < y is',x<y)

# Output: x == y is False
print('x == y is',x==y)

# Output: x != y is True
print('x != y is',x!=y)

# Output: x >= y is False
print('x >= y is',x>=y)

# Output: x <= y is True
print('x <= y is',x<=y)
Python

Output

 
 
x > y is False

x < y is True

x == y is False

x != y is True

x >= y is False

x <= y is True
Markup

Logical operators are the andornot operators.

OperatorMeaningExample
andTrue if both the operands are truex and y
orTrue if either of the operands is truex or y
notTrue if operand is false (complements the operand)not x

Example 3: Logical Operators in Python

 
x = True
y = False

print('x and y is',x and y)

print('x or y is',x or y)

print('not x is',not x)
Python

Output :-

x and y is False
x or y is True
not x is False
Markup

Here is the truth table for these operators.


Bitwise operators

Bitwise operators act on operands as if they were strings of binary digits. They operate bit by bit, hence the name.

For example, 2 is 10 in binary and 7 is 111.

In the table below: Let x = 10 (0000 1010 in binary) and y = 4 (0000 0100 in binary)

OperatorMeaningExample
&Bitwise ANDx & y = 0 (0000 0000)
|Bitwise ORx | y = 14 (0000 1110)
~Bitwise NOT~x = -11 (1111 0101)
^Bitwise XORx ^ y = 14 (0000 1110)
>>Bitwise right shiftx >> 2 = 2 (0000 0010)
<<Bitwise left shiftx << 2 = 40 (0010 1000)

Assignment operators

Assignment operators are used in Python to assign values to variables.

a = 5 is a simple assignment operator that assigns the value 5 on the right to the variable a on the left.

There are various compound operators in Python like a += 5 that adds to the variable and later assigns the same. It is equivalent to a = a + 5.

OperatorExampleEquivalent to
=x = 5x = 5
+=x += 5x = x + 5
-=x -= 5x = x – 5
*=x *= 5x = x * 5
/=x /= 5x = x / 5
%=x %= 5x = x % 5
//=x //= 5x = x // 5
**=x **= 5x = x ** 5
&=x &= 5x = x & 5
|=x |= 5x = x | 5
^=x ^= 5x = x ^ 5
>>=x >>= 5x = x >> 5
<<=x <<= 5x = x << 5

Special operators

Python language offers some special types of operators like the identity operator or the membership operator. They are described below with examples.

Identity operators

is and is not are the identity operators in Python. They are used to check if two values (or variables) are located on the same part of the memory. Two variables that are equal does not imply that they are identical.

OperatorMeaningExample
isTrue if the operands are identical (refer to the same object)x is True
is notTrue if the operands are not identical (do not refer to the same object)x is not True

Example 4: Identity operators in Python

 
x1 = 5
y1 = 5
x2 = 'Hello'
y2 = 'Hello'
x3 = [1,2,3]
y3 = [1,2,3]

# Output: False
print(x1 is not y1)

# Output: True
print(x2 is y2)

# Output: False
print(x3 is y3)
Python

Output

False
True
False
Markup

Here, we see that x1 and y1 are integers of the same values, so they are equal as well as identical. Same is the case with x2 and y2 (strings).

But x3 and y3 are lists. They are equal but not identical. It is because the interpreter locates them separately in memory although they are equal.


Membership operators

in and not in are the membership operators in Python. They are used to test whether a value or variable is found in a sequence (stringlisttupleset and dictionary).

In a dictionary we can only test for presence of key, not the value.

OperatorMeaningExample
inTrue if value/variable is found in the sequence5 in x
not inTrue if value/variable is not found in the sequence5 not in x

Example #5: Membership operators in Python

 
x = 'Hello world'
y = {1:'a',2:'b'}

# Output: True
print('H' in x)

# Output: True
print('hello' not in x)

# Output: True
print(1 in y)

# Output: False
print('a' in y)
Python

Output

True
True
True
False
Markup

Here, 'H' is in x but 'hello' is not present in x (remember, Python is case sensitive). Similarly, 1 is key and 'a' is the value in dictionary y. Hence, 'a' in y returns False.

I hope you understand the concept of operators in python. If you have any query or suggestion please do a commnet.

Thank You.


Variables and Data types in Python

What is variables ?

A variable is a name given to a memory location in a program.

Example : –

a = 5

b = "This is a string"

c = 4.5
Python

variable is use to contain a value.

What is keyword ?

Predefine or reversed words in programmming languages are called keywords.

ex  print(), input() etc all are keywords.

What is identifier ?

An identifier is nothing but a name assigned to an element in a program. Example, name of a variable, function, etc. Identifiers are the user-defined names . As the name says, identifiers are used to identify a particular element in a program.

Data Types in python

Data type identify the type of variable. Data type is an important concept. Variables can store data of different types, and different types can do different things.

 

Basic Data Types in Python :

  1. Integer – a number without decimals ( 1, 55, 234 )
  2. Float – a number with decimals values ( 2.4, 5.8 )
  3. Strings – A set of characters called strings ( this is a string ) and strings are written inside the double or single quotes
  4. Booleans :- True or False
  5. None :- Doesn’t not contain any value.

Python is a fantastic programming language that automatically identifies the type of variables

Example :-

a = 71 ( identifies as <int>) means it is an integer value

b = 2.5 (identifies as <float> ) means it is a floating number.

c = “string” ( identifies as <str> ) means it is a string value

Type casting using Type() function.

Type() function is use to find the data type of a variable in python

example :-

a = 8

print(type(a))

b =7.3

print(type(b))

c = "string"

print(type(c))
Python

Output : –

<class 'int'>
<class 'float'>
<class 'str'>
Markup

Note : – Every thing in python is an object.

( Hello World !) Program and Comments in Python

Today we are going to write our first program in python. So let’s start. Open your code editor and start writing with me .

print("Hello World ! This is your first python program.")
Python

Output : –

Hello World ! This is your first python program.
Markup

Congratulations you write your first python program.

Let’s understand how its work. Print is a built in function when we want to display ouput on screen we use print function any thing inside the print its print on the output screen.

What is Comments in python ?

Any line of code that we dont want to execute with program and compiler ignore those lines are called comments.

Example:-

# This is a comment 
print(" We use hash (#) to comment. ")
Python

There are two types of comments

  1. Single line comments : – Using # in above example
  2. Multi line comment : – When we want to comment more than one line then we use multi line comment using (”’ ”’) triple quote symbol.

Example : –

# this is a single line comment

print("Hello world")

''' this 

        is 

          multi line comment '''
Python

I hope you learn and enjoy how to write program in python . If you have any query or suggestion please do a comment.

Thank You !

Introduction to Python

What is Python ?

Those who are coming from a coding background already know that python is a programming language or if you dont know dont worry i’m here to tell you about everything about python.

So, lets started. Python is an interpreted ( run line by line ), general-purpose ( use every where ) and high-level programming language ( easy readable and understandable ). It was created by Guido van Rossum during 1985 – 1990.

Why to learn python?

Python is very easy language to learn as compare to other programming language it is widely used. It supported all the funcationality of other programming lanuages like Object-oriented and functional programming and many more. It uses english keywords where as other languages use punctuation.

Advantages : –

  1. Easy to learn, read and write
  2. Its improved productivity you do not need to write more code you can simply write less and your work is done. Because every thing in python is already written you have to just import modules ( if you don’t understand import modules don’t worry we talk about later ) these code and use them very easily That’s why it also called write less and do more.
  3. Dynamically typing its automatically know the type of variables you dont need to declare its type.
  4. Free and open source, you can use python for free and its has very large community to support so you will never stuck at any point.
  5. Portability once you write the code you can run at any platforms.
  6. you can start your career in web development, mobile development,descktop development,machine learning,A.I, Data science and automation with the help of by learning its frameworks, library and modules.

Disadvantages : –

  1. Slow speed as compare to any other programming languages like c,c++, java it quite slower than these langauges.
  2. Weak in mobile computing
  3. Database access
  4. Runtime errors

Modules in Python

A module is a file containing code written by somebody (else usually ) which can be imported and used in our programs.

Types of modules:-

  1. Builtin modules :- Those modules that are allready comes with python we do not need to import them. like ( os, apc ) etc.
  2. External modules :- Those modules which are imported that are wriiten by some one else using PIP. Like ( flask, django, tenserflow , pandas, numpy ) etc.

What is pip ?

Pip is a package manager for python you can use pip to install a module in your program.

go to terminal or powershell and type but first python is install in your pc. To install python go to python.org download and simply intsall and after that run this command in your terminal or powershell.

pip install flask
Python

flask is a external module with the help of pip we install flask in our sytstem and use it later accordingly . basically it is use for developming web application or connecting to database ( like mysql ) etc.

REPL ( Read Evaluate print loop )

we can use python simple as a calculator

  1. Go to terminal
  2. Type python and press enter.
  3. now you can do simple maths calculation like ( add muliply subtract divide)

for now its done here . we learn more about python later in this tutorial we seen python installation module if you dont understand dont worry when we do praticale then we understand better .

download here

I hope you gain some knowledge from this post .if you have any quesry or suggestion please do comment.

Thank you!

Disney Plus Mod APK 1.7.2 (Premium Unlocked) with All Content


In this modern age, like every other streaming service, Disney has it’s own service too. Disney Plus is available for Android and iOS devices, however you can also access the Disney Plus website and can stream there. Like most of the streaming services, Disney Plus has subscription-based plans too. In order to stream Disney Plus content, firstly, you will have to pay and buy a subscription plan.

However, what if you don’t want to buy anything, but you still want to check out Disney Plus content. If you are in kinda this type of situation, then you can use a MOD APK version of the Disney Plus app. A mod app is a modified app by individuals or groups to enhance or to remove the limitations of the native app. Disney Plus MOD will allow you to stream premium content for free, and much more, we will discuss below.



Disney Plus Mod APK 1.72 (Premium Unlocked) with All Content


The MOD version of the Disney Plus app is circulating on the internet for quite some time now. MOD APK’s? Yes, because you don’t have to pay for premium features and content, you can access it for free.

However, since the developer of modded apps is often individual, the apps are not perfect. There are often errors and bugs, you can find on MOD apps, and Disney Plus MOD is an exception. Therefore, the developer has released an update for the Disney Plus MOD app. The latest version of the Disney plus MOD app is 1.7.2. We will discuss its features and much further in this article.



Benefits of using Disney Plus Mod with Premium Unlock


By using the Disney Plus MOD app, you can access your favorite movies and TV series from Disney, Pixar, Marvel, etc.  You can find all the latest content that you would find in the original Disney Plus app. From Lion King to Originals, you can find every new movie, complete TV series, shorts, and documentaries in the MOD app. Even more, the premium contents are also accessible for free in the MOD app. as you can see, there are plenty of benefits for the MOD app, however, there might be a slight slow connection issue during streaming.

Moreover, you can download the Movies, Tv series in the Disney Plus MOD app. There will be no ads in it. Because the app shows premium content without any ads; it is totally ad_free. Even more, using the MOD app, you can stream on upto four devices. You will get 4K UHD and HDR resolution for streaming, and there is also a dedicated Kids profile.



Download Disney Plus Mod APK 1.72 For Android

The MOD app is only about 15 megabytes in size. The installation is very simple, like every other APK you install on Android. The lastest MOD of Disney Plus comes with previous bugs fixes and the latest contents.


               Click Here To Download App



Disney Plus MOD APK Premium Features


The Premium is unlocked in the MOD Disney Plus app, as well as Free Subscriber. But what about its interface? Is it the same as the original app? No, the interface has been very less tapered with. There are not any major changes to the UI. Thus, it means you will have the same smooth experience that you would have using the Original application.

Even more, everything is in the category of Movies and Tv series, so you can find content easily. If you wish to install and check the MOD Disney Plus APK for yourself then, click on the link below to download.

Extreme ApkTool 1.0.0 – Re-engineer Android Apps + Edit / Mod any android application


Hello Readers, today I have a software which will allow you to mod /edit any android application using this. This is a Windows Based Software and to run this you need to install Java on your Windows PC/Laptop.

If you are new to Android, and you want to learn things up. So this Software will help you because even a noobies (new learner) can use this. Interface is easy and quick to learn. Using this tool, you can edit and mod any android application and also you can use this to generate Java source code.

                                Download


Features:

  • Coming with user interface.
  • No need to type codes
  • Compile APK/JAR
  • Decompile APK/JAR
  • Sign APK/JAR
  • ZipAlign
  • Extract readable java source from application
  • DeOdex system apps
  • Install/test app to device with a single click.


Requirements

  • A windows PC
  • Java (latest is recommended)

C - Basic Introduction

C is a general-purpose high level language that was originally developed by Dennis Ritchie for the Unix operating system. It was first implemented on the Digital Equipment Corporation PDP-11 computer in 1972.

The Unix operating system and virtually all Unix applications are written in the C language. C has now become a widely used professional language for various reasons.
  • Easy to learn
  • Structured language
  • It produces efficient programs.
  • It can handle low-level activities.
  • It can be compiled on a variety of computers.

Facts about C

  • C was invented to write an operating system called UNIX.
  • C is a successor of B language which was introduced around 1970
  • The language was formalized in 1988 by the American National Standard Institue (ANSI).
  • By 1973 UNIX OS almost totally written in C.
  • Today C is the most widely used System Programming Language.
  • Most of the state of the art software have been implemented using C

Why to use C ?

C was initially used for system development work, in particular the programs that make-up the operating system. C was adoped as a system development language because it produces code that runs nearly as fast as code written in assembly language. Some examples of the use of C might be:
  • Operating Systems
  • Language Compilers
  • Assemblers
  • Text Editors
  • Print Spoolers
  • Network Drivers
  • Modern Programs
  • Data Bases
  • Language Interpreters
  • Utilities

Worth to know about C language

Oracle is written in c
Core libraries of android are written in c
MySQL is written in c
Almost every device drivers is written in c
Major part of the browser is written in c
Unix operating system is developed in c
C is the world's most popular programming language

For students :-

• C is important to build programming skills
• C covers basic features of all programming language
• Campus recruitment process
• C is the most popular language for hardware dependent programming

C Program File

All the C programs are written into text files with extension ".c" for example hello.c. You can use "vi" editor to write your C program into a file.
This tutorial assumes that you know how to edit a text file and how to write programming instructions inside a program file.

C Compilers

When you write any program in C language then to run that program you need to compile that program using a C Compiler which converts your program into a language understandable by a computer. This is called machine language (i,e. binary format). So before proceeding, make sure you have C Compiler available at your computer. It comes along with all flavors of Unix and Linux.
If you are working over Unix or Linux then you can type gcc -v or cc -v and check the result. You can ask your system administrator or you can take help from anyone to identify an available C Compiler at your computer.
If you don't have C compiler installed at your computer then you can use below given link to download a GNU C Compiler and use it.

codeblock - http://www.codeblocks.org/downloads/2
turbo c++ - https://developerinsider.co/download-turbo-c-for-windows-7-8-8-1-and-windows-10-32-64-bit-full-screen/

Make Your Computer Welcome you

To use this trick, follow the instructions given below:-

Step 1: Click on Start. Navigate to All Programs, Accessories and Notepad.

Step 2: Copy and paste the exact code given below.

 Dim speaks, speech
 speaks=”Welcome to your PC, Username”
 Set speech=CreateObject(“sapi.spvoice”)
 speech.Speak speaks

Step 3: Replace Username with your own name.

Step 4: Click on File Menu, Save As, select All Types in Save as Type option, and save the file as Welcome.vbs or “*.vbs”.

Step 5: Copy the saved file.

Step 6: Navigate to C:Documents and SettingsAll UsersStart MenuProgramsStartup (in Windows XP) and to C:Users
 {User-Name}AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup (in Windows 8, Windows 7 and Windows Vista) if C: is your System drive. AppData is a hidden folder. So, you will need to select showing hidden folders in Folder options to locate it.

Step 7: Paste the file.

Now when the next time you start your computer, Windows will welcome you in its own computerized voice.

How to Delete your Google Web History ?

Step 1 : Visit your Google History page at https://google.com/history

Alternatively, you can click the gear icon on the upper right corner of a search results page, and then go to Search history.

Step 2 : Click on the gear icon again, and then go to Settings.

Step 3 : Click on the delete all link. You’ll be prompted for a confirmation. Click on Delete all again, and your entire search history is gone!

Step 4 : (optional): Click on the Turn off button on the Settings page to stop Google from storing your history again.

If you don’t want to delete your entire history, you can select individual items from the History main page, and delete them.

Create an Undeletable and Unrenamable folders in Windows

Try to make a new folder in windows & give it name con, aux, lpt1, lpt2, lpt3 up to lpt9. you won’t be allowed to create folder with above mentioned names, Because they are reserved words in windows.

How To Create Undeletable And Unrenamable Folders ?

Step 1: Open Command Prompt. Press Win+R, type cmd and click Enter

Step 2: Remember you cannot create Undeletable & unrenamable folder in your root directory (i.e. where the windows is installed)

Step 3: Type D: or E: in CMD and hit Enter

Step 4: Type -
 md con
and hit enter (md – make directory)

Step 5: You may use other words such asaux, lpt1, lpt2, lpt3 up to lpt9 instead of con in above step.

Step 6: Open that directory, you will see the folder created of name con.

Step 7: Try to delete that folder or rename that folder windows will show the error message.

How to delete that folder ?

It is not possible to delete that folder manually but you can delete this folder by another way mentioned below.

Step 1: Open Command Prompt

Step 2: Type D: ( if u created this type of folder in D: drive) & hit enter

Step 3: Type rd con(rd – remove directory)

Step 4: Open that directory and the folder will not appear because it is removed.

How To Create Android Apps Without Coding ?

As you all know that Android is one of most used mobile platform in the world. Android is free and open source operating system so one can easily customize this operating system. If you have much experience or thought about android app’s but don’t have any coding experience then this post is going to benefit you! You can easily create android app’s without any coding.

How To Create Android Apps Without Coding

There are lots of websites available on the internet to create android apps without anycoding but will tell you about the conventional ones only. Just follow the procedure to create your android app free and without any coding.

Features :-

These are the best sites for android application making without any coding :

#1 AppsGeyser

AppsGeyser is a FREE service that converts your content into an App and makes your money. Your app will have all you need including messaging, social sharing, tabsand full support for HTML5 enhancements. But forget about the app, Apps geyser helps you to build a business and profit from mobile!

#2 Appypie

Appy Pie is the fastest growing cloud based Mobile Apps Builder Software (App Maker) that allows users with no programming skills, to create Android & iPhone applications for mobiles and smartphones; and publish to Google Play & iTunes. With Appy Pie, there is no need to install or download anything, you can just drag & drop app pages to create your mobile app online. Once the App is published, you will receive an HTML5 based hybrid app that works with Android, iPhone, iPad, Windows Phone and Blackberry

#3 Buzztouch

Buzztouch is an open source “app engine” that powers tens of thousands of iPhone, iPad, and Android applications. Buzztouch is used in conjunction with the iOS and Androidsoftware developer kits (SDK’s).The BtCentral Control Panel is open source web-based software that is used to administer mobile apps created using Buzztouch.

#4 Appyet

Using AppYet, anyone can create a professional Android app. There’s no programming knowledge required, only take a few minutes to build your first app. All you need to provide is links to RSS/Atom feed or website, they are automatically converted into stunning 100% pure native apps for Android. You have freedom to list/sell the app on Google Play and many other Android Markets.

#5 Appclay

AppClay , conceived and created by core development experts at ShepHertz Technologies, is an esteemed intuitive interface that enables each one of us- become an App developer effortlessly without any coding, software installation, maintenance and financial investment. Anyone can use AppClay to create HTML5 and ANDROID native Apps supported by all widely popular devices.

AppsGeyser and above listed websites are the best sites for android app making without any coding. These sites provide you to create many types of apps like Website, Page, Browser, Youtube app ( for you channel ), HTML code, TV, Photo, News, Book, Audio, Wallpaper and Quiz apps etc. In order to make these apps, you need to create the free account on this website. After this, you have to select you app category mentioned above later on you will have to select app name description about your application. After all these things you have to click on Create App button. After in few minutes you will be able to download your created app in app format. You can also further update your app.





HTML 5 for extra Features.
Earn money by your apps.
Modify apps at any time.
No Need Of Coding.
No Cost.

Featured Post

List in Python

  List are just like dynamic array, declared in other languages( like vector in c++ and array list in java ). A single list may contain data...