i
Python functionality and evolution
Installing Python (windows and Ubuntu)
IDLE (Integrated Development and Learning Environment)
Write the first python program and execute it
Keywords in Python
Identifiers in Python
Indentation in Python
Comments in Python
Multi-line Comments in Python
Getting user input
Python Function
Calling a function
Arguments in Function
Scope of Variables
Modules in Python
The PYTHON PATH-Variable
Python File Open
Python File Opening Modes
The file-Object-Attributes
Python File Close() Method
Python File Read/Write
Python File Position
Renaming and Deleting Files in Python
Python Directory Methods
File/Directory Methods
Exceptions in Python
The try-finally Clause
The argument of Exception
Raising Exceptions
Python Built-in Exceptions
Python OOPs Concepts
Python Classes/Objects
Creating Instance Objects
Accessing Attributes
Built-In Class Attributes
Garbage Collection
Python Inheritance
Overriding Methods
Method overriding
Data Hiding
Regular Expression
The match function
The search function
Match Object Methods & Description
Matching or Searching
Search or Replace
Regular Expression Modifiers / Option Flags
Grouping with Parentheses
Python Socket Programming
Python Socket Server
Python Socket Client
Send Data Between Clients
Python Socket or Server
Python Socket Clients
Points to ponder
They are used to control flow in execution of program depends upon condition is true when the block will execute and if the condition is flase then block will not execute.
Python assumes non-zero and non-null values a TRUE and if it is zero or null then it assumes as FALSE.
In below are the types of decision making statements:
1. if statements
2. if....else statements
3. nested if statements
Example:
if and if....else statements
Please write below code in your IDLE and run : Here input() function will take input from you or user accordingly.
Here you will note why we have assign variable “int” but in python as explained above no need to assign any variable……think!!!!!!............yes you are right because python default variable is string so to make it integer we have to mentioned below as “int”.
Save the file for above code as test.py and execute compiler by pressing F5. Output would be shown as below :
Output:
Enter a number: 12
Enter another number: 13
Second number is greater than first number
nested if statements
Program:
Don't miss out!