Set 3
Set 3
First Semester
(Regulations 2021)
1. a) Write a Python program to generate Electricity Bill and develop a flow chart for the same.
b) Develop a Python program to find the Biggest of 3 numbers using nested if...else
statement.
2. a) An integer, n, is said to be perfect when the sum of all of the proper divisors of n is equal to
n. For example, 28 is a perfect number because its proper divisors are 1, 2, 4, 7 and 14, and 1 +
2 + 4 + 7 + 14 = 28.
b) Develop a Python program to find whether the given number is Positive or Negative using if
statement.
3. a) Develop a Python program to read two numbers as input and Swap the Two Numbers
(using three variables).
b) Develop a Python Program to read numerator and denominator and print their quotient and
remainder.
4. a) Write a program that accepts the lengths of three sides of a triangle as input the program
output should indicate whether or not the triangle ,is right triangle(recall from the Pythagorean
theorem that in a right triangle ,the square of one side equals the sum of the squares of the other
two sides).
b) Develop a Python program to find the sum of odd and even numbers using for statement.
Page 1 of 3
5. a) Write a python program to get the 5 subjects marks and display the grade for the same.
6. a) To write a python program to find the sum of first ‘n’ natural number.
b) Write a Python program to select a random element from a list, set, dictionary (value) and a
file from a directory. Use random.choice().
7. a) write a program to create, concatenate and print a string and accessing sub-string from
given string.
b) Develop a Python program to find the biggest of 3 numbers using nested if...else statement
9. a) Code a Python program create a list from given list having number and its cube in each
tuple.
b) Read two strings. Print the common characters in both the strings and the count of them.
b) Write a Python program to find the first repeated word in a given string.
a) Write a python program to remove duplicates from a list.
13.
b) Write a python program to perform linear search
14. a) Code a Python program to accept a String, Reverse the String,Check whether the string is a
Palindrome and print the result.
Page 2 of 3
16. a) Write a program that Input a Text File. The program should print all of the unique words
in the file in Alphabetical order.
a) Develop a program for Voter’s age validity. Validate using Exceptional handling
18.
feature in python. (Ex: age of the voter is > 18 or not).
b) Write a Python program to convert a tuple to a string.
a) Write a python class to reverse a string word by word.
19.
b) A prime number is an integer greater than one that is only divisible by one and itself. Write a
function that determines whether or not its parameter is prime, returning True if it is, and False
otherwise.
a) Simulate Bouncing Ball Using Pygame
20.
b) Write a Python program to remove Duplicates from a list.
Page 3 of 3