Cbse Class 12 Maths Project
Cbse Class 12 Maths Project
TOPIC: PYTHON PROGRAM AND
SQL QUERIES
SESSION: 2020-2021
------------------- --------------------
Teacher's signature Principal's signature
-----------------------
External Invigilator's Signature
ACKNOWLEDGEMENT
I would like to express my special thanks of gratitude to my teacher Ashish Ashk
as well as our principal R.K.Mishra who gave me the golden opportunity to do this
wonderful project on the topic “Python program and SQL queries “, which also
helped me in doing a lot of Research and I came to know about so many new
things I am really thankful to them.
TABLE OF CONTENTS
A. 15 Python programs with output
B. 5 SQL queries with output
# PYTHON PROGRAM WITH OUTPUT
1.Write a Python program to print the calendar of a given month and year.
import calendar
print(calendar.month(y, m))
output:
output:
3. Python3 program to add two numbers
num1 = 15
num2 = 12
sum = num1 + num2
print("Sum of {0} and {1} is {2}" .format(num1, num2, sum))
output:
output:
5. Write a Python program to concatenate all elements in a list into a string and
return it.
def concatenate_list_data(list):
result= ''
for element in list:
result += str(element)
return result
6. Write a Python program to display your details like name, age, address in
three different lines.
def personal_details():
name, age = "harivansh",16
address = "Biratnagar,morang,nepal"
print("Name: {}\nAge: {}\nAddress: {}".format(name, age, address))
personal_details()
output:
7. Write a Python program to compute the distance between the points (x1, y1)
and (x2, y2).
import math
p1 = [4, 0]
p2 = [6, 6]
distance = math.sqrt( ((p1[0]-p2[0])**2)+((p1[1]-p2[1])**2) )
print(distance)
c = sqrt(a**2 + b**2)
print("The length of the hypotenuse is", c )
output:
9. Write a Python program to convert the distance (in feet) to inches, yards, and
miles.
10. Write a Python program to test whether a passed letter is a vowel or not.
def is_vowel(char):
all_vowels = 'aeiou'
return char in all_vowels
print(is_vowel('c'))
print(is_vowel('e'))
11. Write a Python program to convert seconds to day, hour, minutes and
seconds.
time = float(input("Input time in seconds: "))
day = time // (24 * 3600)
time = time % (24 * 3600)
hour = time // 3600
time %= 3600
minutes = time // 60
time %= 60
seconds = time
print("d:h:m:s-> %d:%d:%d:%d" % (day, hour, minutes, seconds))
output:
output:
13. Write a Python program to get the ASCII value of a character.
print()
print(ord('a'))
print(ord('A'))
print(ord('1'))
print(ord('@'))
print()
output:
14. Write a Python program to remove the first item from a specified list.
color = ["Red", "Black", "Green", "White", "Orange"]
print("\nOriginal Color: ",color)
del color[0]
print("After removing the first color: ",color)
print()
output:
15. Python Program for factorial of a number
def factorial(n):
if n < 0:
return 0
elif n == 0 or n == 1:
return 1
else:
fact = 1
while(n > 1):
fact *= n
n -= 1
return fact
# Driver Code
num = 5;
print("Factorial of",num,"is",
factorial(num))
output:
# SQL COMMANDS
DEDRAJ SEWALI DEVI
TODI DAV-KVB SCHOOL
TOPIC: BANK MANAGEMENT SYSTEM
SESSION: 2020-2021
SUBMITTED BY:HARIVANSH SHARMA
CLASS : XII
ROLL NO:
CERTIFICATE
This is to certify that HARIVANSH SHARMA has successfully completed this
project report entitled “BANK MANAGEMENT SYSTEM”. during the
academic year 2020-2021 towards partial fulfillment of computer science practical
examination conducted by CBSE.
------------------- --------------------
Teacher's signature Principal's signature
-----------------------
External Invigilator's Signature
ACKNOWLEDGEMENT
I would like to express my special thanks of gratitude to my teacher Ashish Ashk
as well as our principal R.K.Mishra who gave me the golden opportunity to do this
wonderful project on the topic “BANK MANAGEMENT SYSTEM”, which also
helped me in doing a lot of Research and I came to know about so many new
things I am really thankful to them.