Python

 

Write a Python program

Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination Lab Course: (CA-506) Computer Laboratory Based on  Python

Slip 1 A)Write a Python program to accept n numbers in list and remove duplicates from a list.


Slip 1 B)Write Python GUI program to take accept your birthdate and output your age when a button is pressed.

 

Slip 2 A) Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters.

Sample String: 'The quick Brown Fox' Expected

Output: No. of Upper case characters: 3

No. of Lower case characters: 13

 

Slip 2 B) Write Python GUI program to create a digital clock with Tkinter to display the time.


Slip 3  A) Write a Python program to check if a given key already exists in a dictionary. If key exists replace with another key/value pair.


Slip 3  B) Write a python script to define a class student having members roll no, name, age, gender. Create a subclass called Test with member marks of 3 subjects. Create three objects of the Test class and display all the details of the student with total marks.


Slip 4  A) Write Python GUI program to create background with changing colors


Slip 4  B) Define a class Employee having members id, name, department, salary. Create a subclass called manager with member bonus. Define methods accept and display in both the classes. Create n objects of the manager class and display the details of the manager having the maximum total salary (salary + bonus).


Slip  5 A) Write a Python script using class, which has two methods get_String and print_String. get_String accept a string from the user and print_String print the string in upper case.


Slip 5  B) Write a python script to generate Fibonacci terms using generator function.


Slip 6 A) Write python script using package to calculate area and volume of cube and sphere


Slip 6 B) Write a Python GUI program to create a label and change the label font style (font name, bold, size). Specify separate check button for each style.


Slip 7 A) Write Python class to perform addition of two complex numbers using binary + operator overloading.


Slip 7 B) Write python GUI program to generate a random password with upper and lower case letters.

 

Slip 8 A) Write a python script to find the repeated items of a tuple


Slip 8 B) Write a Python class which has two methods get_String and print_String. get_String accept a string from the user and print_String print the string in upper case. Further modify the program to reverse a string word by word and print it in lower case.

 

Slip 9 A) Write a Python script using class to reverse a string word by word


Slip 9 B) Write Python GUI program to accept a number n and check whether it is Prime, Perfect or Armstrong number or not. Specify three radio buttons.


Slip 10 A) Write Python GUI program to display an alert message when a button is pressed.


Slip 10 B) Write a Python class to find validity of a string of parentheses, '(', ')', '{', '}', '[' ']’. These brackets must be close in the correct order. for example "()" and "()[]{}" are valid but "[)", "({[)]" and "{{{" are invalid.


Slip 11 A) Write a Python program to compute element-wise sum of given tuples. Original lists: (1, 2, 3, 4) (3, 5, 2, 1) (2, 2, 3, 1) Element-wise sum of the said tuples: (6, 9, 8, 6)


Slip 11 B) Write Python GUI program to add menu bar with name of colors as options to change the background color as per selection from menu option.

 

Slip 12 A) Write a Python GUI program to create a label and change the label font style (font name, bold, size) using tkinter module.


Slip 12 B) Write a python program to count repeated characters in a string. Sample string: 'thequickbrownfoxjumpsoverthelazydog' Expected output: o-4, e-3, u-2, h-2, r-2, t-2

 

Slip 13 A) Write a Python program to input a positive integer. Display correct message for correct and incorrect input. (Use Exception Handling)


Slip 13 B) Write a program to implement the concept of queue using list.

 

Slip 14 A) Write a Python GUI program to accept dimensions of a cylinder and display the surface area and volume of cylinder.


Slip 14 B) Write a Python program to display plain text and cipher text using a Caesar encryption.

 

Slip 15 A) Write a Python class named Student with two attributes student_name, marks. Modify the attribute values of the said class and print the original and modified values of the said attributes.


Slip 15 B) Write a python program to accept string and remove the characters which have odd index values of given string using user defined function.

 

Slip 16 A) Write a python script to create a class Rectangle with data member’s length, width and methods area, perimeter which can compute the area and perimeter of rectangle.


Slip 16 B) Write Python GUI program to add items in listbox widget and to print and delete the selected items from listbox on button click. Provide three separate buttons to add, print and delete.

 

Slip 17 A) Write Python GUI program that takes input string and change letter to upper case when a button is pressed.


Slip 17 B) Define a class Date (Day, Month, Year) with functions to accept and display it. Accept date from user. Throw user defined exception “invalid Date Exception” if the date is invalid.


Slip 18 A) Write Python GUI program that takes input string and change letter to upper case when a button is pressed


Slip 18 B) Define a class Date (Day, Month, Year) with functions to accept and display it. Accept date from user. Throw user defined exception “invalid Date Exception” if the date is invalid.

 

Slip 19 A) Write a Python GUI program to accept a number form user and display its multiplication table on button click.


Slip 19 B) Define a class named Shape and its subclass(Square/ Circle). The subclass has an init function which takes an argument (Lenght/redious). Both classes should have methods to calculate area and volume of a given shape.


Slip 20 A) Write a Python GUI program to accept a number form user and display its multiplication table on button click.


Slip 20 B) Define a class named Shape and its subclass(Square/ Circle). The subclass has an init function which takes an argument (Lenght/redious). Both classes should have methods to calculate area and volume of a given shape

 

Slip 21 A) Define a class named Rectangle which can be constructed by a length and width. The Rectangle class has a method which can compute the area and Perimeter.


Slip 21 B) Write a Python program to convert a tuple of string values to a tuple of integer values. Original tuple values: (('333', '33'), ('1416', '55')) New tuple values: ((333, 33), (1416, 55))


Slip 22 A) Write a python class to accept a string and number n from user and display n repetition of strings by overloading * operator.


Slip 22 B) Write a python script to implement bubble sort using list

 

Slip 23 A) Write a Python GUI program to create a label and change the label font style (font name, bold, size) using tkinter module.


Slip 23 B) Create a class circles having members radius. Use operator overloading to add the radius of two circle objects. Also display the area of circle.

 

Slip 24 A) Write a Python Program to Check if given number is prime or not. Also find factorial of the given no using user defined function.


Slip 24 B) Write Python GUI program which accepts a number n to displays each digit of number in words.


Slip 25 A) Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters. Sample String : 'The quick Brow Fox' Expected

Output : No. of Upper case characters : 3

No. of Lower case Characters : 12


Slip 25 B) Write a Python script to Create a Class which Performs Basic Calculator Operations.


Slip 26 A) Write an anonymous function to find area of square and rectangle


Slip 26 B) Write Python GUI program which accepts a sentence from the user and alters it when a button is pressed. Every space should be replaced by *, case of all alphabets should be reversed, digits are replaced by?.


Slip 27 A) Write a Python program to unzip a list of tuples into individual lists.


Slip 27 B) Write Python GUI program to accept a decimal number and convert and display it to binary, octal and hexadecimal number.


Slip 28 A) Write a Python GUI program to create a list of Computer Science Courses using Tkinter module (use Listbox).


Slip 28 B) Write a Python program to accept two lists and merge the two lists into list of tuple.


Slip 29 A) Write a Python GUI program to calculate volume of Sphere by accepting radius as input.


Slip 29 B) Write a Python script to sort (ascending and descending) a dictionary by key and value.

 

Slip 30 A) Write a Python GUI program to accept a string and a character from user and count the occurrences of a character in a string.


Slip 30 B) Python Program to Create a Class in which One Method Accepts a String from the User and Another method Prints it. Define a class named Country which has a method called print Nationality. Define subclass named state from Country which has a mehtod called print State. Write a method to print state, country and nationality.


Python Python Reviewed by technical_saurabh on December 30, 2021 Rating: 5

No comments:

Powered by Blogger.