How to use if-else, elif decision control instruction in python with examples

By // No comments:
There are two ways to control the program flow as given below:-
  1. Decision control instruction (e.g. if ,if-else,elif)
  2. Repetition control instruction (e.g. while,for)
Indentation in Python:-
  • Indentation is used to declare a block in python.If two statements are at the same indentation level,then they are the part of the same block.
  • Python doesn't allow the use of parentheses for the block of codes.
  • All the statements of one block are intended at the same level indentation.
  • In this,we will see how the actual indentation takes place in decision control instructions and others in python.
Decision control instruction:-
There are three ways for taking decisions in a program as given below.
  1. if condition
  2. if-else condition
  3. elif condition
3

What is Asymptotic Notations and how to design and analysis of algorithms with examples

By // No comments:
There are many solutions for a particular problem.Means, For one problem we can design more than one algorithms.But how to find which algorithms are good and which are bad.

There are two ways to find the Ideal Algorithms for any particular problem as given  below:-
  1. Time:-An algorithm is good which takes less time.
  2. Space:-An algorithm is good which takes less space(storage).
The efficiency of any algorithms fully dependent on time,space and other resources which are needed to execute any algorithms. 
Asymptotic Notations:-
Asymptotic notations are the mathematical notations.It is used to represent the complexity of algorithms.This allows us to analyze an algorithm's running time and its behaviors. There are mainly three asymptotic notations to find the complexity of algorithms as given below:-
3

What is Flow chart and how to use different symbols with examples

By // No comments:
Flow chart:-Flow chart is a graphical representation of algorithms to solve the step by step problems in sequential manner.It uses different kinds of Boxes and arrows to represent the process.
There are following symbols are used in flow chart as given below:-
3

What is Algorithms and its Characteristics with examples

By // 1 comment:
Algorithm:-
  • An algorithm is a finite lists of instructions in sequence to solve the computation problems.
  • An algorithm is a step by step of finite number of process to solve the problems.You can write the algorithms in any language which is understandable to the persons (programmers)
  • In Real life,an algorithm is a recipe for any cooking dish.
Characteristics of Algorithms:-
There are following characteristics of any algorithms as given below.
3

string concepts in python part 5

By // No comments:
There are some operational functions for the strings as given below:-
1.) split() :-The split() function is used to split(breaks up) at a specified separator and returns a list of strings. 
Syntax
string.split(separator,maxsplit)
The split function takes maximum two parameters as given below:-
  • Separator:-This is an optional parameter.If separator is specified ,the string split at this specified separator.If separator is not specified ,the string is split at white space (space,newline,coma etc.) separator.
  • maxsplit:-This is also an optional parameter.The maxsplit is used to define maximum number of splits. The default value of max split is -1 ,means no limit of number of splits.
3

String concepts in python Part 4

By // No comments:
There are some search and replace functions operations in strings as given below:-
1.) find():- The find() function returns the index value of the string where the substring is found between start index and end index.start index and end index is optional parameter.

  • If substring is present in given string then this function returns the index of the first occurrence of the substring.
  • If the substring is not exist inside the string then it returns -1 index
3

string concepts in python part 3

By // No comments:
String operations in python:
There are many Built-in string function available in python language.Here We will learn content test functions with examples as given below:-
1.) isalpha() :-It returns True ,if all characters in the string are alphabets otherwise False. The alphabets can be lower case and upper case both.This function doesn't take any parameters.If string contains a white space or any numeric value then this function returns False.
Syntax:-
String.isalpha()
3
Powered by Blogger.