Introduction to Python
Introduction to Python - an integrated high level language, interactive mode and script mode. Data types –Number (Integer - boolean, decimal, octal, hexadecimal; Floating point; Complex), none, Sequence (String,Tuples, List ) Sets, Mapping.
Mutable and Immutable Variables
Variables, Expressions and Statements: Values, Variables and keywords; Operators and Operands in Python: (Arithmetic, relational and logical operators), operator precedence, Expressions and Statements (Assignment statement); Taking input (using raw_input() and input()) and displaying output (print statement); Putting Comments.
Functions: Importing Modules (entire module or selected objects), invoking built in functions, functions from math module (for example, ceil, floor, fabs, exp, log, log10, pow, sqrt, cos, sin, tan, degrees, radians), using random() and randint() functions of random module to generate random numbers, composition.
Defining functions, invoking functions, passing parameters (default parameter values, keyword arguments), scope of variables, void functions and functions returning values, flow of execution
Conditional constructs and looping: if else statement while, for (range function), break, continue, else, pass, nested if, nested loops, use of compound expression in conditional and looping construct.
Programming with Python
Strings: Creating, initialising and accessing the elements; string operators: +, *, in, not in, range slice [n:m]; comparing strings using relational operators; String functions & methods: len, capitalize, find, isalnum, isalpha, isdigit, lower, islower, isupper, upper, lstrip, rstrip, isspace, istitile, partition, replace, join, split, count, decode, encode, swapcase, String constants, Regular Expressions and Pattern Matching
Lists: Concept of mutable lists, creating, initializing and accessing the elements, traversing, appending, updating and deleting elements, composition, lists as arguments
List operations: joining, slicing, + , * , in , not in
List functions and methods: len( ), insert( ), append( ), extend( ), sort( ), remove( ), reverse( ), pop( ), list( ), count( ), extend( ), index( ), cmp( ), max( ), min( )
Dictionaries: Concept of key-value pair, creating, initialising and accessing the elements in a dictionary, traversing, appending updating and deleting elements
Dictionary Functions and methods: cmp( ), len( ), clear( ), get( ), has_key( ), items( ), key( ), update( ), values( ), pop( ), fromkeys( ), dict( )
Tuples: Immutable concept, creating, initialising and accessing elements in a tuple, Tuple assignment, Tuple slices, Tuple indexing,
Tuple Functions: cmp(), len(), max(), min(), tuple(), index(), count(), sum(), any(), all(), sorted(), reversed()
No comments:
Post a Comment