Page 119 - CatalogNEP-LS
P. 119
THEORY (30 Hours)
UNIT I: (4 Hours)
Introduction to Programming
Problem solving strategies; Structure of a Python program; Syntax and semantics; Executing
simple programs in Python.
UNIT II: (10 Hours)
CreatingPythonPrograms
Identifiersandkeywords;Literals,numbers,andstrings;Operators;Expressions;Input/output
statements; Defining functions; Control structures (conditional statements, loopcontrolstatements,
break, continueand pass, exitfunction), default arguments.
UNIT III: (10 Hours)
Built-inDataStructures
Mutable and immutable objects; Strings, built-in functions for string, string traversal,
stringoperators and operations; Lists creation, traversal, slicing and splitting operations, passing
listtoafunction; Tuples, sets, dictionaries, andtheiroperations.
UNIT IV: (6 Hours)
ObjectOrientedProgramming
Introductiontoclasses,objects,andmethods;Standardlibraries.
FileandExceptionHandling
Filehandlingthroughlibraries;Errorsand exceptionhandling.
PRACTICAL (15 Hours)
ListofPractical:
1. WAPtofindtherootsofaquadratic equation
2. WAPtoacceptanumber‗n‘and
a. Check if ‘n‘ is prime
b. Generate all prime numbers till ‗n‘
c. Generate first ‗n‘ prime numbers This program may be done using functions
3. WAPtocreateapyramidofthecharacter‗*‘andareversepyramid
*
***
*****
*******
*********
*********
*******
******
***
*
9. WAPthatacceptsacharacterandperformsthefollowing:
a. print whether the character is a letter or numeric digit or a special character
b. if the character is a letter, print whether the letter is uppercase or lowercase
c. if the character is a numeric digit, prints its name in text (e.g., if input is 9, output is
NINE)
d. WAP to perform the following operations on a string
104