Python programming lab internal questions
I-II CSM-B&CSE-C
Set 1
1) a) Write a program to convert a list and tuple into arrays.
b) Write a program to find common values between two arrays.
2) Writes a recursive function that generates all binary strings of n-bit length.
Set 2
1) a) Add a comma between the characters. If the given word is 'Apple', it should become 'A,p,p,l,e'
b) Remove the given word in all the places in a string?
2) Write a function that takes a sentence as an input parameter and replaces the first letter of every word
with the corresponding upper-case letter and the rest of the letters in the word by corresponding letters in
lower case without using a built-in function?
Set 3
1) a) Write a python program that defines a matrix and prints
b) Write a python program to perform addition of two square matrices
2) Python Program to Print the Fibonacci sequence using while loop.
Set 4
1) Python program to print all prime numbers in a given interval (use break).
2) a) Write a function called is_sorted that takes a list as a parameter and returns True if the list is sorted in
ascending order and False otherwise.
b) Add a comma between the characters. If the given word is 'Apple', it should become 'A,p,p,l,e'.
set 5
1) Writes a recursive function that generates all binary strings of n-bit length.
2) a) Python program to print all prime numbers in a given interval (use break)
b) Write a program to convert a list and tuple into arrays.
Set 6
1) Writes a recursive function that generates all binary strings of n-bit length
2) a) Write a python program that defines a matrix and prints
b)Write a python program to perform addition of two square matrices