Skip to content

Latest commit

 

History

History
66 lines (55 loc) · 3.63 KB

File metadata and controls

66 lines (55 loc) · 3.63 KB
                          Cycle 1
  1. Program to read Day, Month, and Year. Then display the corresponding date in DD- MM-YYYY format. Also, Check whether the date is from a leap or not.

  2. Program to read a line of text. Count and display the occurrences of each word in a line of text. Take the first word in the text and exchange the first and last letters of the same.

  3. Program to read three numbers and find the biggest. Let ‘n’ is the biggest number, compute n+nn+nnn. Assume the same ‘n’ is the radius of a circle and find its Area and Perimeter. Find the volume of a sphere with a radius ‘n’.

  4. Create a list of colors (color list1) from comma-separated color names entered by the user. Display the first and last colors. Read another color list and print out all colors from color-list1 not contained in color-list2. Create another List from color list 1 by assigning an integer value for each color. From this list of integers, create a list removing even numbers.

  5. Create a Dictionary. Sort the dictionary in ascending and descending order. Create another dictionary and Merge these two dictionaries.

                                 Cycle 2
    
  6. Program to find the factorial of a number 2. Generate Fibonacci series of N terms

  7. Find the sum of all items in a list 4. Generate a list of four digit numbers in a given range with all their digits even and the number is a perfect square.

  8. Count the number of characters (character frequency) in a string.  Add ‘ing’ at the end of a given string. If it already ends with ‘ing’, then add ‘ly’  Accept a list of words and return length of longest word.  Construct following pattern using nested loop

  9. Generate all factors of a number.,Write lambda functions to find area of square, rectangle and triangle.

                                  Cycle 3
    
  10. Work with built-in packages. Create a package graphics with modules rectangle, circle and sub-package 3D-graphics with modules cuboid and sphere. Include methods to find area and perimeter of respective figures in each module.

  11. Write programs that finds area and perimeter of figures by different importing statements. (Include selective import of modules and import * statements)

                                      Cycle 4
    
  12. Create Rectangle class with attributes length and breadth and methods to find area and perimeter. Compare two Rectangle objects by their area.

  13. Create a Bank account with members account number, name, type of account and balance. Write constructor and methods to deposit at the bank and withdraw an amount from the bank

  14. Create a class Rectangle with private attributes length and width. Overload ‘<’ operator to compare the area of 2 rectangles.

  15. Create a class Time with private attributes hour, minute and second. Overload ‘+’ operator to find sum of 2 time Cycle 5

  16. Create a class Publisher (name). Derive class Book from Publisher with attributes title and author. Derive class Python from Book with attributes price and no_of_pages. Write a program that displays information about a Python book. Use base class constructor invocation and method overriding.

  17. Write a Python program to read a file line by line and store it into a list. 2. Python program to copy odd lines of one file to other 3. Write a Python program to read each row from a given csv file and print a list of strings.

  18. Write a Python program to read specific columns of a given CSV file and print the content of the columns.

  19. Write a Python program to write a Python dictionary to a csv file. After writing the CSV file read the CSV file and display the content