0% found this document useful (0 votes)
13 views17 pages

Yash Cs

The document is a project report by Yash, a student of class XI-A, certifying the completion of a Computer Science project under the guidance of Mr. Mohit Sharma for the academic year 2023-2024. It includes acknowledgments, an index of topics covered such as databases using MySQL and various Python programming exercises. The content details database concepts, SQL commands, and several Python programs demonstrating basic programming skills.

Uploaded by

adityaraj06228
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views17 pages

Yash Cs

The document is a project report by Yash, a student of class XI-A, certifying the completion of a Computer Science project under the guidance of Mr. Mohit Sharma for the academic year 2023-2024. It includes acknowledgments, an index of topics covered such as databases using MySQL and various Python programming exercises. The content details database concepts, SQL commands, and several Python programs demonstrating basic programming skills.

Uploaded by

adityaraj06228
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

SCHOLARS PRIDE

LEARNING TO EXCEL
SECTOR-16, FARIDABAD, HARYANA

NAME- YASH
CLASS- XI-A
ROLL NO-04
SUBMITTED TO- MR. MOHIT
SHARMA
Certificate
This is to certify that YASH,student of
class XI A has successfullycompleted
this project under the guidance of Mr.
Mohit Sharma during the year 2023-
2024 in partial fulfillment of Computer
Science of practical examination by
AISSCE, New Delhi.

__________________ _________________
Signature of External Examination Signature of Internal
Examiner
Acknowledgement
I, YASH of XI A acknowledge the valuable
contribution of the entire individual and
resources that had contributed in carrying
out this project work.
I wish to express my sincere gratitude to my
Computer Science teacher Mr. Mohit Sharma,
who gave her valuable suggestions and
assistance to complete this project. I also
thank our principal sir Mr. A.K.Saxena who
gave me the golden opportunity do this
wonder project.
I would like to thank my family members and
friends who helped me to complete the
project successfully.
YASH
XI A
04
INDEX
 DATA BASE (MY SQL)
1) What is Data Base?
2) Uses of data types in data base
3) How SQL Work?
4) What is constrant and their types?
5) Check Constant
 PYTHON PROGRAMMING
1) Write a program to show table of any number.
2) Write a program to use of if, else or elif condition make a
full program.
3) Write a program to add, subtract and multiplication of
program.
4) Write a program to display student information.
5) Write a program to show pattern.
6) Write a program to show reverse counting using while
loop.
7) String Programming
8) Write a pogram to show even & odd number in one
program.
9) Write a program to display 5 message from 5 different
function.
DATA BASE (MY SQL)
 What is Data Base?
It is a collection of records or collection of
related records.
They are 2 types of database:-
 DBMS
In this data base will be save in paragraph
format. for example :- oracle 8i, oracle 9i,
oracle 10i.
 RDBMS
In this data base will be save in tabular format. For
example:- My SQL 5.5 command, SQL Server
2000,SQL Server 2005, SQL Server 2008, SQL Server
2012 .
SQL
Language
Query
Structure
 Uses of data types in data base
 Int (integer)
 Char (character)
 Varchar
 How SQL Work?
root
create database xyz;
use xyz;
create table xyz
( rollno int, name char(20), class int, section
char(1));
insert into xyz values(27,’amit’,11,’c’);
select * from xyz;
rollno name class Section
27 amit 11 c

select name, rollno, section from xyz;


name rollno class
amit 27 11

Alter table xyz add primary key(rollno);


insert into xyz values(24,’sumit’,11,’c’);
alter table table xyz add fee int;
select* from xyz;
rollno name class section Fee
23 amit 11 c Null
24 mohit 11 c Null
Exit

 What is constrant and their types?


There are some rules & regulation that we
regulations that we are applied on the table is
called constrant .
There are following types of constrant used in
SQL
 Primary Key:- A key that contain a unique values
is called primary key. Only one primary key
will be used in table. Primary key does not
contain any null values.
 Unique Key:- It is same as a primary key but the
difference between the primary & unique key that
accept null values. Primary key not accept null
values
 Forign Key:- A foreign key is a field that is linked
to another table ‘s primary key field in a
relationship between two tables.
 Check Constrant:- The
CHECK constraint is used to limit the
value range that can be placed in a
column.
If you define a CHECK constraint on a
column it will allow only certain values
for this column.
If you define a CHECK constraint on a
table it can limit the values in certain
columns based on values in other
columns in the row.
PYTHON PROGRAMMING

1.Write a program to show table of any number.


a=int(input("enter the value of a"))
for i in range(1,11):
print(a,'*',i,'=',a*i)

OUTPUT
enter the value of a
7*1 = 7
7*2 = 14
7*3 = 21
7*4 = 28
7*5 = 35
7*6 = 42
7*7 = 49
7*8 = 56
7*9 = 63
7*10 = 70
2. Write a program to use of if, else or elif
condition make a full program.
result = 0

vall = float(input("Enter value 1: "))


val2 = float (input("Enter value 2: "))
op = input("Enter any of the operator (+,-,*,/):")

if op == "+":
result = vall + val2

elif op == '-':
if vall > val2:
result = vall - val2
else:

result = val2- vall

elif op == "*":

result = vall * val2

elif op == "/":
if val2 == 0:

print("Please enter a value other than 0")

else:
result = vall / val2

else:
print("Please enter any one of the operator (+, -, *, /)")
print("The result is: ", result)

OUTPUT

Case1 :
>>> %Run -c $EDITOR_CONTENT
Enter value 1: 20
Enter value 2: 40
Enter any of the operator (+,-,*,/):-
The result is: 20
>>>

Case 2:
>>> %Run -c $EDITOR_CONTENT
Enter value 1: 200
Enter value 2: 400
Enter any of the operator (+,-,*,/):+
The result is: 600.0
>>>
Case 3:
>>> %Run -c $EDITOR_CONTENT
Enter value 1: 2
Enter value 2: 4
Enter any of the operator (+,-,*,/):*
The result is: 8
>>>
Case 4:
>>> %Run -c $EDITOR_CONTENT
Enter value 1: 200
Enter value 2: 400
Enter any of the operator (+,-,*,/):*
The result is: 80000.0
>>>

3. Write a program to add, subtract and


multiplication of program.

a= int(input("enter the value of a"))


b= int(input("enter the value of b"))
c= a+b
print ("the sum of two no is",c)
d= int(input("enter the value of d"))
e= int(input("enter the value of e"))
f= d-e
print ("the sum of two no is",f)
g= int(input("enter the value of g"))
h= int(input("enter the value of h"))
i= g*h
print ("the sum of two no is",i)

OUTPUT

>>> %Run -c $EDITOR_CONTENT


enter the value of a35
enter the value of b45
the sum of two no is 80
enter the value of d45
enter the value of e35
the sum of two no is 10
enter the value of g45
enter the value of h35
the sum of two no is 1575
>>>
4. Write a program to display student information.
Name= str(input("enter the Name"))
Rollno= int(input("enter the Rollno"))
Class= str(input("enter the Class"))
Address= str(input("enter the Address"))
FatherName= str(input("enter the FatherName"))
MotherName= str(input("enter the MotherName"))
print ()

OUTPUT
>>> %Run -c $EDITOR_CONTENT
enter the Name yash
enter the Rollno 04
enter the Class XI-A
enter the Address ma nahi batu ga
enter the FatherName ma nahi batu ga
enter the MotherName ma nahi batu ga

5. Write a program to show pattern.


n= 6
for i in range(n):
for j in range (i+1):
print(chr(j+65),end= "")
print()
OUTPUT
>>> %Run -c $EDITOR_CONTENT
A
AB
ABC
ABCD
ABCDE
ABCDEF
6. Write a program to show reverse counting
using while loop.
i=11
while i>= 1:
print(i)
i= i-1
OUTPUT
>>> %Run -c $EDITOR_CONTENT
11
10
9
8
7
6
5
4
3
2
1
>>>
7. String Programming
Org_str="Passport5634b876Ky"
New_str=""
for letter in org_str:
if letter. Isdigit():
New_str="*"
elif letter not in "prfby":
New_str+=letter.upper()
else:
New_str+=letter.lower()
print(new_str)

OUTPUT
Passport****B***kY

8. Write a pogram to show even & odd number


in one program.

for i in range (1,11):


if i% 2== 0:
print(i,end="")
else:
print(i)
OUTPUT
%Run -c $EDITOR_CONTENT
1
23
45
67
89
10
>>>

9. Write a program to display 5 message from


5 different function.
def ABC():
print("hello")
def XYZ():
print("i am yash")
def MNO():
print("i study in class 11th non medical")
def PYQ():
print("i want to become a army officer")
def KGF():
print("thank you")
ABC()
XYZ()
MNO()
PYQ()
KGF()
OUTPUT
>>> %Run -c $EDITOR_CONTENT
hello
i am yash
i study in class 11th non medical
i want to become a army officer
thank you
>>>

You might also like