Python Archive

Basic Functions in Python

Basic functions flow: We define function in python using “def” Function can have n number of statements Function execute only when we call that function. Calling is a single statement used to access the function …

Python input()

input(): The input() from the user it takes evaluates the expression. In Python automatically identifies whether user entered a string or a number or list. If the input provided is not correct then automatically coming …

Python Data Conversion Functions

Reading input from End-user : input() function is pre-defined. It is used to read input while application is running. It returns the input in String format only We need to convert these String type input …

Python ASCII and UNICODE

Character System: File is a collection of bytes. Every symbol occupies 1 byte memory in File. Every symbol stores into memory in binary format. Symbol converts into binary based on its ASCII value. Character system …

chr() and ord() in python

ord():Returns the integer for specified symbol. chr(): Return the symbol for specified integer value. Note: To understand the functionality of chr() and ord() functions, we need to know the values of ASCII character set. ASCII …

Operators in Python

Operator: Operator is a symbol, to operate operands. Operator performs operations on one or more operands. Operands like variables, constants and functions Python divides the operators in the following way: Arithmetic Operators Comparison (Relational) Operators …

Python Control Statements

Control statements: Statement is a line of code. Program is a set of statements. Statements execute either sequential or random. Sequential execution from top to bottom in the program. Control statements execute randomly and repeatedly …

Python if block

If – block: “if” is a keyword. “if” block is used to execute a block only if the condition is valid. We can place the condition directly or with parenthesis Syntax: or Flow Chart: Simple …

Python if-else block

If-else block: Else block is used to execute a block of instructions when if block fails. No need to specify condition for else block. “else” block is optional for if-block. Syntax: FlowChart: We can specify …

Python Nested if block

Nested – If: Defining if block inside another if block. Inner block condition evaluates only when outer condition is valid Simple code: Output it: We can define else block for every nested if block: Number …

Courses Enquiry Form