Document (2) Ip

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 33

A minor project on

PYTHON
PROGRAMMING
AND MY SQL
Submitted to

CENTRAL BOARD OF SECONDARY

EDUCATION NEW DELHI

In Partial fulfillment for the award of degree of

AISSCE PRACTICAL EXAMINATION IN

Informatics Practices (065)

By

SAVNI AGRAWAL

Class -12th “PCM”

Under the Guidance of

ER. SANDEEP SAHU

PGT (IP)
DECELERATION
We hereby declare that the project entitled Python Programming & SQL Queries is
The actual work carried out by us in the department of INFORMATICS PRACTICES
Under the guidance of Er. SANDEEP SAHU PGT (IP).

SAVNI AGRAWAL. SIGN.


CERTIFICATE
This is to certify that the project entitled Python Programming & SQL has

Been carried out by SAVNI AGRAWAL under my guidance in partial

Fulfilment for the award of (AISSCE PRACTICAL EXAMINATION) in

INFORMATICS PRACTICES by the Central Board of Secondary Education,

(M.P.), during the academic year 2022-2023.

Er. Sandeep Sahu

Head of department of Informatics

Practices & Computer Science

Mr. Pankaj Mukhar

Principal

JCS School, Sagar


ACKNOWLEDGEMENT
It gives me immense pleasure to express my deepest sense of gratitude and sincere thanks to my

Highly respected and esteemed guide Er. Sandeep Sahu, PGT (IP/CS), Informatics Practices

Department, JCS School Sagar, for their valuable guidance, encouragement and help for

Completing this work. Their useful suggestions for this whole work and co-operative behavior are

Sincerely acknowledged.

I would like to express my sincere thanks to Mr. Pankaj Mukharya, Principal JCS

School Sagar for giving me this opportunity to undertake this project.

I also wish to express my gratitude’s to Mr. Joy Mukharya, Vice Principal JCS School Sagar

For his kind hearted support. I am also grateful to my teacher Mr. Sandeep Sahu PGT (IP) for

Their constant support and guidance

I also wish to express my indebtedness to my parents as well as my family member whose

Blessings and support always helped me to face the challenges ahead.

At the end I would like to express my sincere thanks to all my friends and others who helped me

Directly or indirectly during this dissertation work.


INDEX
I INTRODUCTION
II ADVANTAGES AND DISADVANTAGE
III CODING IN PYTHON
1.Python program to calculate sum , difference and product of two input number
2.Program to calculate how can vote or not
3.Python program to calculate the largest of 3 number given as input
4.Program to calculate square and cube of a number given as input
5.Python program to take input as a number and give output a table
6.python script to take input for 2 numbers and an operator (+ , – , * , / )and
based on the operator calculate the output
INTRODUCTION
Python, a versatile and high-level

Programming language, stands out for its

Simplicity, readability, and vast capabilities

Across multiple domains. Known for its

syntax and easy learning curve,

Python empowers developers to express

Complex concepts with concise, readable

Code. Its extensive libraries and frameworks

Support diverse applications, including web

Development, data analysis, artificial

Intelligence, scientific computing, automation,

And more. Python’s interpreted nature allows

For quick development and testing, while its

Dynamic typing simplifies variable handling.

With a thriving community offering rich


Documentation and support, Python remains
A go-to choice for beginners and seasoned
Developers seeking an efficient and flexible
Language to create powerful, scalable, and
Sophisticated solutions across various
Industries
PROGRAM 1
 Python program to calculate sum , difference
and product of two input number
PROGRAM 2
 • Program to calculate how can vote or not
INPUT

OUTPUT
 Age >=18 Yes
 Age< 18. No
PROGRAM 3
 Python program to calculate the largest of 3 number
given as input
OUTPUT
PROGRAM 4
 Program to calculate square and cube of a number
given as input
INPUT
OUTPUT
PROGRAM 5
 Python program to take input as a number and give
output a table
INPUT
 OUTPUT
PROGRAM 6
 Python script to take input for 2 numbers and an
operator (+ , – , * , / )and based on the operator
calculate the output
OUTPUT
PYTHON PANDAS
 What is Pandas?
Pandas is a Python library used for working with data
sets.

It has functions for analyzing, cleaning, exploring, and


manipulating data.

The name “Pandas” has a reference to both “Panel


Data”, and “Python Data Analysis” and was created by
Wes McKinney in 2008.

Pandas is a Python library that is incredibly useful for


wrangling raw data into something more valuable. You
might be wondering why a library has been named
after a really cute animal but Pandas actually stands
for “Panel Data” and it is a term borrowed from
econometrics. Learning how to manipulate your
dataset using Pandas is a critical skill and this tutorial
will cover some essential Pandas operations:

 Loading Dataframes
 Joining and Merging Dataframes
 Adding and Deleting Columns
 Deleting Null Values
 Analysis and Checking Data Types

 Why Use Pandas?


Pandas allows us to analyze big data and make
conclusions based on statistical theories.

Pandas can clean messy data sets, and make them


readable and relevant.
PYTHON PANDA
SERIES
Pandas Series is a one-dimensional labeled array capable of
holding data of any type (integer, string, float, python objects,
etc.). The axis labels are collectively called indexes.Pandas
Series is nothing but a column in an Excel sheet. Labels need
not be unique but must be a hashable type. The object
supports both integer and label-based indexing and provides a
host of methods for performing operations involving the
indexIn the real world, a Pandas Series will be created by
loading the datasets from existing storage, storage can be SQL
Database, CSV file, or an Excel file. Pandas Series can be
created from lists, dictionaries, and from scalar values,
In the real world, a Pandas Series
will be created by loading the
datasets from existing storage,
storage can be SQL Database,
CSV file, or an Excel file. Pandas
Series can be created from lists,
dictionaries, and from scalar
values,
CREATE A SERIES USING
DICTIONARY
CREATING SERIES USING
SCALER VALUE
CREATING A SERIES USING
NUMPY ARRAY
PERFORMING MATHEMATICAL
OPERATIONS ON SERIES
DISPLAYING ATTRIBUTES OF
SERIES
USING HEAD () AND TAIL () IN
SERIES:
DATAFRAME
Pandas DataFrame is two-dimensional size-mutable, potentially
heterogeneous tabular data structure with labeled axes (rows and
columns). A Data frame is a
two-dimensional data
structure, i.e., data is aligned
in a tabular fashion in rows
and columns. Pandas
DataFrame consists of three
principal components, the
data, rows, and columns

In the real world, a


Pandas DataFrame will be created by loading the datasets from
existing storage, storage can be SQL Database, CSV file, and Excel file.
Pandas DataFrame can be created from the lists, dictionary, and from
a list of dictionary etc

You might also like