PROGRAM 1 : That inputs an integer in range 0– 999 and then prints if the integer entered is a 1/2/3 digit number.
CODE:
OUTPUT:
PROGRAM 2 :To print cubes of number in the range 15 to 18.
CODE:
OUTPUT:
PROGRAM 3: Inputs an integer in range 0-999 and prints it is a 1/2/3 digit number .
CODE:
OUTPUT:
PROGRAM 4: To sort a list using bubble sort.
CODE:
OUTPUT:
PROGRAM 5:To check the string whether it is a palindrome or not.
CODE:
OUTPU
T:
PROGRAM 6: Takes a string with multiple words and then capitalizes the first letter of each word and forms a new
string out of it.
CODE:
OUTPUT:
PROGRAM 7: Write a function that receives an octal number and prints the equivalent number in other number bases ie,
in decimal, binary and hexadecimal equivalents.
CODE:
OUTPUT:
PROGRAM 8 : A program that generates 4 terms of an AP by providing initial and step values that return the first
four terms of the series.
CODE:
OUTPUT:
PROGRAM 9 : a program that inputs a main string and then creates an encrypted string by embedding a short symbol
based string after each character. The program should also be able to produce the decrypted string from encrypted
string.
CODE:
OUTPUT:
PROGRAM 10: In a school fest, three randomly chosen students out of 100 students (having roll numbers 1-100) have to
present bouquets to the guests. Help the school authorities choose three students randomly.
CODE:
OUTPUT:
PROGRAM 11: Program to calculate simple interest using a function interest() that can receive principal amount, time
and rate and returns calculated simple interest. Do specify default values for rate and time as 10% and 2 years
respectively.
CODE:
OUTPUT:
PROGRAM 12: That receives two numbers in a function and returns the results of all arithmetic operations (+,-,*,/,%) on
these numbers.
CODE:
OUTPUT:
PROGRAM 13: How can we implement a stack using a list in Python?
CODE:
OUTPUT:
PROGRAM 14: Append two more student details to the same file.
CODE:
–
OUTPUT:
PROGRAM 15: Program to display the size of a file in byte.
CODE:
OUTPUT:
PROGRAM 16: Get the number of students and their details, then save them to a file.
CODE:
OUTPUT:
PROGRAM 17 : Modify Record in a Binary File Using Python's pickle Module
CODE:
OUTPUT:
PROGRAM 18: PYTHON PROGRAM TO IMPLEMENT STACK OPERATION .
CODE:
OUTPUT:
Program 19: Create a table and insert data.
CODE:
PROGRAM 20 : Select all records from the table
CODE:
OUTPUT:
PROGRAM 21: : Update age for a student.
CODE:
OUTPUT:
PROGRAM 22:
CODE:
OUTPUT:
PROGRAM 23: to delete a student record and display the updated table.
CODE:
OUTPUT:
PROGRAM 24 : Soft Delete - Mark a Student as Inactive Instead of Deleting.
CODE:
OUTPUT:
PROGRAM 25 : To connect Python with an SQL database and execute queries
CODE:
OUTPUT: