1. (a). Write a python program to read a number n and compute n+nn+nnn.
(b). write a python program to Print a specified list after removing the 0th, 4th and 5th
elements
o Sample List : ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow']
Expected Output : ['Green', 'White', 'Black']
2. (a). Program to compute the distance between the two points (x1, y1) and (x2, y2) on a 2D
plane , Test Data : x1 = 6, x2 = 11, y1 = 4, y2 =16;
Expected Output : 13.0
(b). write a python program to Convert Celsius To Fahrenheit for any numeric value.
3. a. write a python program to Find the Factorial of a Number.
b. Convert a list of multiple integers into a single integer.
o Sample list: [11, 33, 50]
o Expected Output: 113350
4. a. Generate and print a dictionary that contains a number (between 1 and n) in the form (x,
x*x). Go to the editor Sample Dictionary ( n = 5) :
o Expected Output : {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
b. Count the number of characters (character frequency) in a string
o Sample Input : 'ict.iitk.ac.in'
o Expected Result : {'i': 4, 'c': 2, 't': 2, 'k': 1, 'a': 1, 'n': 1}
5. a. Write a python program to calculate the Area of a Triangle, Rectangle, and Square
and save results in a new file.
b. Count the number of characters (character frequency) in a string
o Sample Input : 'ict.iitk.ac.in'
o Expected Result : {'i': 4, 'c': 2, 't': 2, 'k': 1, 'a': 1, 'n': 1}
6. a. write a python program to Convert a list of multiple integers into a single integer.
o Sample list: [11, 33, 50]
o Expected Output: 113350
b. write a python program to compute the future value of a specified principal amount,
rate of interest, and a number of years.
o Test Data : amt = 10000, int = 3.5, years = 7
Expected Output : 12722.79
7. A.Write a python program to read a number n and to display the multiplication Table.
B. Calculate the sum of three given numbers, if the values are equal then return thrice of their
sum.
User input : 3, 3,3
Expected output : 27
8. a. Write a python program to read a number n and m values form the user and check whether
a number is divisible by another number or not.
b. Write a python program to read a number n and to display the multiplication Table in
the new file. ( use file handling)
9. a. write a python program to compute the future value of a specified principal
amount, rate of interest, and a number of years. Store the results in a new file *.txt.
o Test Data : amt = 10000, int = 3.5, years = 7
Expected Output : 12722.79
b. Write a python program to read a number n and m values form the user and check whether a
number is divisible by another number or not.
10. a. write a python program to print the following pattern in a file. User input: 12.
B. Calculate the sum of three given numbers, if the values are equal then return thrice of their
sum.
User input : 3, 3,3
Expected output : 27
11. a. Write the code for the given Floyd’s triangle pattern, Floyd's triangle is a right-angled
triangular pattern of natural numbers. Floyd's triangle has 1 in first line, 2 & 3 in second line;
4, 5 & 6 in third line and so on.
INPUT: Enter number of rows required: 6
Output screen:
b. Write a python program to read a number n and to display the multiplication Table.