II-B.Tech-ECE-Python Programming-Syllabus
II-B.Tech-ECE-Python Programming-Syllabus
Course Objectives:
To learn the basic concepts of software engineering and life cycle models
To explore the importance of Databases in application Development
Acquire programming skills in core Python
To understand the importance of Object-oriented Programming
Course Outcomes (CO):
Students should be able to
Identify the issues in software requirements specification and enable to write SRS documents for
software development problems
Explore the use of Object oriented concepts to solve Real-life problems
Design database for any real-world problem
Solve mathematical problems using Python programming language
Basic concepts: abstraction versus decomposition, the evolution of software engineering techniques, Software
development life cycle
Software project management: project planning and project scheduling
Task:
1. Identifying the Requirements from Problem Statements
Strings: Creating strings and basic operations on strings, string testing methods.
OOPS Concepts; Classes and objects- Attributes- Inheritance- Overloading- Overriding- Data hiding
Modules and Packages: Standard modules-Importing own module as well as external modules Understanding
Packages Powerful Lamda function in python Programming using functions, modules and external packages
Electronics & Communication Engineering
Working with Data in Python: Printing on screen- Reading data from keyboard- Opening and closing file-
Reading and writing files- Functions-Loading Data with Pandas-Numpy
Tasks:
1. OPERATORS
a. Read a list of numbers and write a program to check whether a particular element is present or not using
membership operators.
b. Read your name and age and write a program to display the year in which you will turn 100 years old.
c. Read radius and height of a cone and write a program to find the volume of a cone.
d. Write a program to compute distance between two points taking input from the user (Hint: use
Pythagorean theorem)
2. CONTROL STRUCTURES
a. Read your email id and write a program to display the no of vowels, consonants, digits and white spaces in it
using if…elif…else statement.
b. Write a program to create and display a dictionary by storing the antonyms of words. Find the antonym of a
particular word given by the user from the dictionary using while loop.
c. Write a Program to find the sum of a Series 1/1! + 2/2! + 3/3! + 4/4! +…….+ n/n!. (Input :n = 5, Output :
2.70833)
d. In number theory, an abundant number or excessive number is a number for which the sum of its proper
divisors is greater than the number itself. Write a program to find out, if the given number is abundant. (Input:
12, Sum of divisors of 12 = 1 + 2 + 3 + 4 + 6 = 16, sum of divisors 16 > original number 12)
3: LIST
a. Read a list of numbers and print the numbers divisible by x but not by y (Assume x = 4 and y = 5).
b. Read a list of numbers and print the sum of odd integers and even integers from the list.(Ex: [23, 10, 15, 14,
63], odd numbers sum = 101, even numbers sum = 24)
c. Read a list of numbers and print numbers present in odd index position. (Ex: [10, 25, 30, 47, 56, 84, 96], The
numbers in odd index position: 25 47 84).
d. Read a list of numbers and remove the duplicate numbers from it. (Ex: Enter a list with duplicate
elements: 10 20 40 10 50 30 20 10 80, The unique list is: [10, 20, 30, 40, 50, 80])
4: TUPLE
a. Given a list of tuples. Write a program to find tuples which have all elements divisible by K from a list of
tuples. test_list = [(6, 24, 12), (60, 12, 6), (12, 18, 21)], K = 6, Output : [(6, 24, 12), (60, 12, 6)]
b. Given a list of tuples. Write a program to filter all uppercase characters tuples from given list of tuples.
(Input: test_list = [(“GFG”, “IS”, “BEST”), (“GFg”, “AVERAGE”), (“GfG”, ), (“Gfg”, “CS”)], Output :
[(„GFG‟, „IS‟, „BEST‟)]).
c. Given a tuple and a list as input, write a program to count the occurrences of all items of the list in the tuple.
(Input : tuple = ('a', 'a', 'c', 'b', 'd'), list = ['a', 'b'], Output : 3)
5: SET
a. Write a program to generate and print a dictionary that contains a number (between 1 and n) in the form (x,
x*x).
b. Write a program to perform union, intersection and difference using Set A and Set B.
c. Write a program to count number of vowels using sets in given string (Input : “Hello World”, Output: No. of
vowels : 3)
d. Write a program to form concatenated string by taking uncommon characters from two strings using set
concept (Input : S1 = "aacdb", S2 = "gafd", Output : "cbgf").
Electronics & Communication Engineering
6: DICTIONARY
a. Write a program to do the following operations:
i. Create a empty dictionary with dict() method
ii. Add elements one at a time
iii. Update existing key‟s value
iv. Access an element using a key and also get() method
v. Deleting a key value using del() method
b. Write a program to create a dictionary and apply the following methods:
i. pop() method
ii. popitem() method
iii. clear() method
c. Given a dictionary, write a program to find the sum of all items in the dictionary.
d. Write a program to merge two dictionaries using update() method.
7: STRINGS
a. Given a string, write a program to check if the string is symmetrical and palindrome or not. A string is said
to be symmetrical if both the halves of the string are the same and a string is said to be a palindrome string if
one half of the string is the reverse of the other half or if a string appears same when read forward or backward.
b. Write a program to read a string and count the number of vowel letters and print all letters except 'e' and 's'.
c. Write a program to read a line of text and remove the initial word from given text. (Hint: Use split() method,
Input : India is my country. Output : is my country)
d. Write a program to read a string and count how many times each letter appears. (Histogram).
8: USER DEFINED FUNCTIONS
a. A generator is a function that produces a sequence of results instead of a single value. Write a
generator function for Fibonacci numbers up to n.
b. Write a function merge_dict(dict1, dict2) to merge two Python dictionaries.
c. Write a fact() function to compute the factorial of a given positive number.
d. Given a list of n elements, write a linear_search() function to search a given element x in a list.
9: BUILT-IN FUNCTIONS
a. Write a program to demonstrate the working of built-in statistical functions mean(), mode(),
median() by importing statistics library.
b. Write a program to demonstrate the working of built-in trignometric functions sin(), cos(), tan(), hypot(),
degrees(), radians() by importing math module.
c. Write a program to demonstrate the working of built-in Logarithmic and Power functions exp(), log(),
log2(), log10(), pow() by importing math module.
d. Write a program to demonstrate the working of built-in numeric functions ceil(), floor(), fabs(),
factorial(), gcd() by importing math module.
c. Write a program to create an employee class and store the employee name, id, age, and salary using the
constructor. Display the employee details by invoking employee_info() method and also using dictionary ( dict
).
d. Access modifiers in Python are used to modify the default scope of variables. Write a program to
demonstrate the 3 types of access modifiers: public, private and protected.