Back close

Course Detail

Course Name Python Programming
Course Code 26CSA587
Program M. C. A.
Credits 1
Campuses Amritapuri, Mysuru

Syllabus

1. a. Write a program to get the list of even numbers upto a given number.
b. Write a program to get the ascii distance between two characters.
c. Write a program to get the binary form of a given number.
d. Write a program to convert base36 to octal.

2. a. Write a program to get the number of vowels in the input string (No control flow allowed)
b. Write a program to check whether a given number has even number of 1’s in its binary representation (No control flow, the number can be in any base)
c. Write a program to sort given list of strings in the order of their vowel counts.

3. a. Write a program to return the top ‘n’ most frequently occurring chars and their respective counts. E.g. aaaaaabbbbcccc, 2 should return [(a 5) (b 4)]
b. Write a program to convert a given number into a given base. Note: Convert the given number into a string in the given base. Valid base is 2 <= base <= 36 Raise exceptions similar to how int (“XX”, YY) does (play in the console to find what errors it raises). Handle negative numbers just like bin and oct do.

4. a. Write a program to sort words in a file and put them in another file. The output file should have only lowecase words, so any upper case words from source must be lowered. (Handle exceptions)
b. Write a program return a list in which the duplicates are removed, and the items are sorted from a given input list of strings.

5. Write a program to test whether given strings are anagrams are not.

6. a. Write a class Person with attributes name, age, weight (kgs), height (ft) and takes them through the constructor and exposes a method get_bmi_result() which returns one of “underweight”, “healthy”, “obese”
b. Write a program to convert the passed in positive integer number into its prime factorization form. Note: If number = a1 ^ p1 * a2 ^ p2 … where a1, a2 are primes and p1, p2 are powers >=1 then we represent that using lists and tuples in python as [(a1, p1), (a2, p2), …] e.g.[(2,1), (5,1)] is the correct prime factorization of 10

Objectives and Outcomes

Course Description 

The course aims to equip the students with a comprehensive study of Python Programming. The course includes collection data types, Python functions, Python exception handling mechanism and Object-Oriented paradigm in Python programs.

Course Objectives

The main objective of this course is to familiarize the student with Python programming concepts, syntax, semantics, and the runtime environment, as well as with general coding techniques and object-oriented programming.

Course Outcomes

Cos Description
CO1 Identify the structure, syntax, and semantics of the Python language.
CO2 Solve real world problems by applying the Python Data Structures, Objects, string functions
CO3 Implement functions and modules in python
CO4 Implement the basics of data analysis using advanced Python libraries.
CO5 Describe object-oriented programming in python

CO-PO Mapping 

PO/PSO PO1 PO2 PO3 PO4 PO5 PO6   PO7 PO8
CO
CO1 2 2 2 1
CO2 2 2 2       1
CO3 2 2 2 1    
CO4 2 2 2        
CO5 2 2 3      

Textbooks / References

Textbooks / References:

  • Mark Lutz & David Ascher, “Learning Python”, Oreilly Publications, 5th edition.

Web References:

  • docs.python.co

DISCLAIMER: The appearance of external links on this web site does not constitute endorsement by the School of Biotechnology/Amrita Vishwa Vidyapeetham or the information, products or services contained therein. For other than authorized activities, the Amrita Vishwa Vidyapeetham does not exercise any editorial control over the information you may find at these locations. These links are provided consistent with the stated purpose of this web site.

Admissions Apply Now