UNIT I -Introduction Introduction – Python – History of Python – Features of Python – Obtaining Python – Installing Python – Running Python – Comparing Python
UNIT II -Getting started Python Getting Started: Program Output, the print Statement, and “Hello World!” – Program Input and the raw_input() Built-in Function – Comments – Operators – Variables and Assignment – Numbers – Strings – Lists and Tuples – Dictionaries – Code Blocks Use Indentation – if Statement – while Loop – for Loop and the range() Built-in Function – Files and the open() Built-in Function – Errors and Exceptions – Functions – Classes – Modules
Problem 1: Write a python program to check whether the entered character is an Alphabet or not.
Problem 2: Write a python program to add two numbers by getting the input from the user.
UNIT III -Syntax & Style Syntax and Style: Statements and Syntax – Variable Assignment – Identifiers – Basic Style Guidelines – Memory Management – First Python Application – Python Objects: Python Objects – Standard Types – Other Built-in Types
Problem 3: Write a Python program to swap two variables.
Problem 4: Write a python program to add two binary variables.
UNIT IV -Numbers & Statements Numbers: Operators – Built-in Functions – Conditionals and Loops – if statement – else Statement – While Statement – for Statement – break Statement – continue Statement
Problem 5: Write a Python program to calculate length of a String without using len() function
Problem 6: Write a Python program to check leap year.
UNIT: V- Functions Functions: Functions – Calling Functions – Creating Functions – Passing Functions – Formal Arguments – Positional Arguments – Default Arguments – Default Function Object Argument Example – Variable-length Arguments
Problem 7: Create a python program to create a function with arguments and call the function with different user values as arguments.
Problem 8: Create multiple username and prompt them using python code.
TEXT(S)
Wesley J Chun, Core Python Programming, First Edition, 2000, Prentice Hall, ISBN: 0-13-026036-3
REFERENCE MATERIALS
- Allen Downey, ܜThink Python How to Think Like a Computer Scientistܝ, Green Tea Press, 2012, ISBN-10 : 1491939362
- Dave Kuhlman, ܜA Python Book: Beginning Python, Advanced Python, and Python Exercisesܝ, 2009, Kindle Edition, ISBN-10: 0984221239