11new New New
11new New New
PHYSICS
INVESTIGATORY PROJECT
CLASS – XII
SESSION - 2024-25
TOPIC- TO FIND THE REFRACTIVE
INDICES-(A) .WATER (B).OIL BY USING
PLANE MIRROR AND EQUI-CONVEX
LENS.
SUBMITTED BY- SUBMITTED TO-
NAME: ATUL KASHYAP Mr Suraj Tiwari
ROLL NO : 08
SNO TOPIC PAGE NO
1 Certificate 1
2 Acknowledgement 2
3 Introduction to Python 3
5 Introduction to CSV 9
7 Project Description 12
8 Source Code 14
9 Output Screens 28
10 Bibliography 48
AMITY INTERNATIONAL SCHOOL
VIRAJ KHAND, LUCKNOW
CERTIFICATE
The Python interpreter and the extensive standard library are freely available in
source or binary form for all major platforms from the Python Web
site, https://www.python.org/, and may be freely distributed. The same site also
contains distributions of and pointers to many free third party Python modules,
programs and tools, and additional documentation.
The Python interpreter is easily extended with new functions and data types
implemented in C or C++ (or other languages callable from C). Python is also
suitable as an extension language for customizable applications.
attributes
behavior
Person is an object,
The concept of OOP in Python focuses on creating reusable code. This concept is
also known as DRY (Don't Repeat Yourself).
Class
Object
Methods are functions defined inside the body of a class. They are used to define
the behaviors of an object.
Inheritance
Inheritance is a way of creating new class for using details of existing class without
modifying it. The newly formed class is a derived class (or child class). Similarly,
the existing class is a base class (or parent class).
Encapsulation
Using OOP in Python, we can restrict access to methods and variables. This
prevent data from direct modification which is called encapsulation. In Python, we
denote private attribute using underscore as prefix i.e single “ _ “ or double “ __“.
Polymorphism
Polymorphism is an ability (in OOP) to use common interface for multiple form
(data types).
Suppose, we need to color a shape, there are multiple shape option (rectangle,
square, circle). However we could use same method to color any shape. This
concept is called Polymorphism.
When these exceptions occur, it causes the current process to stop and passes it to
the calling process until it is handled. If not handled, our program will c
A critical operation which can raise exception is placed inside the try clause and
the code that handles exception is written in except clause.
Introduction to MYSQL
DDL
DDL is short name of Data Definition Language, which deals with database
schemas and descriptions, of how the data should reside in the database.
CREATE - to create a database and its objects like (table, index, views, store
procedure, function, and triggers)
ALTER - alters the structure of the existing database
DROP - delete objects from the database
TRUNCATE - remove all records from a table, including all spaces allocated for
the records are removed
COMMENT - add comments to the data dictionary
RENAME - rename an object
DML
DML is short name of Data Manipulation Language which deals with data
manipulation and includes most common SQL statements such SELECT, INSERT,
UPDATE, DELETE, etc., and it is used to store, modify, retrieve, delete and
update data in a database.
DCL
DCL is short name of Data Control Language which includes commands such as
GRANT and mostly concerned with rights, permissions and other controls of the
database system.
TCL
TCL is short name of Transaction Control Language which deals with a transaction
within a database.
There are the following steps to connect a python application to our database.
To create a connection between the MySQL database and the python application,
the connect() method of mysql.connector module is used.
Pass the database details like HostName, username, and the database password in
the method call. The method returns the connection object.
The cursor object can be defined as an abstraction specified in the Python DB-API
2.0. It facilitates us to have multiple separate working environments through the
same connection to the database. We can create the cursor object by calling the
'cursor' function of the connection object. The cursor object is an important aspect
of executing queries to the databases.
<my_cur> = conn.cursor()