Python Seminar Report 2
Python Seminar Report 2
Training Report
Submitted
In partial fulfilment
For the award of the Degree of
Bachelor of Technology
In Department of Electrical Engineering
Submitted Submitted By
Mr . Dinesh Rao Mohammad Ishaq
H.O.D. (EE) 21ECAEE010
SESSION 2023-24
CERTIFICATE
This is to certify that the work which is being presented in the B.tech minor
project has been submitted to the Chartered Institute of Technology, Abu
Road fulfilment of the requirement for the award of degree of Bachelor of
technology in Electrical Engineering
HOD Principal
Electrical Engineering Chartered Institute of Technology
Chartered Institute of Technology Abu Road, Rajasthan
ACKNOWLEDGEMENT
The completion of any inter-disciplinary seminar and report depends upon
corporation, coordination and combined efforts of several sources of
knowledge. I am grateful to Mr . Dinesh Rao for him willingness to give
me valuable advice and direction whenever I approached him with a
problem. I am thankful to him for providing immense guidance for this
seminar.
Mohammad Ishaq
21ECAEE010
I
Declaration
II
ABSTRACT
Python is a modern, easy-to-learn, object-oriented programming language. It
has a powerful set of built-in data types and easy-to-use control constructs.
Since Python is an interpreted language, it is most easily reviewed by
simply looking at and describing interactive sessions. It is used in vast
number of applications due to the various standard libraries that come along
with it and its capacity to integrate with other languages and use their
features. Python can be used for scripting, web scraping, and creating data
sets. It’s popular in the scientific community for scientific computing; there
are libraries that make it easy to share academic code projects in Python.
Python is a web programming language, so it interfaces with the internet. It
knows how to receive and send web requests and talk to databases. This
paper describes the main features of Python programming, loops and control
statements in python then discusses applications of Python programming.
III
CONTENT
Certificate..........................................................................................................................I
Acknowledgement............................................................................................................II
Declaration......................................................................................................................III
Abstract...........................................................................................................................IV
Chapter 1: INTRODUCTION.........................................................................................1
Chapter 2: INSULATORS TYPES.................................................................................3
2.1: Distribution Lines.......................................................................................................4
2.2: Transmission Lines………..........................................................................................5
2.3: Substations…………..................................................................................................6
Chapter 3: DESIGN CRITERIA OF INSULATORS……...........................................9
3.1: Introduction……………..............................................................................................9
3.2: Mechanical Consideration..........................................................................................10
3.3: Electrical Consideration…….....................................................................................11
3.4: Pollution performance…............................................................................................12
3.5: Degradation of the insulators.....................................................................................13
3.6: Brittle Fracture…………...........................................................................................14
Chapter 4: MANUFACTURING PROCESS……………….......................................15
4.1: Slurry Preparation…..................................................................................................15
4.2: Filter Pressing……….……………………………...………………………………16
4.3: Extrusion/Forming………………………………………………………………….17
4.4: Finishing………………………………………………………………………….…18
4.5: Drying………….…………………………………………………………………...19
4.6: Glazing Making…………………………………………………………………......20
4.7: Glazing and Sanding...……………………………………………………………...21
4.8: Firing..............................................................................…………………………...22
4.9: Cutting and Grinding……………………………………………………………….23
4.10: Cement Mixing...………………………………………………………………….24
4.11: Assembly……….………………………………………………………………….25
IV
4.12: Testing…………………………………………………………………………….26
4.12.1: Banding(Mechanical)……………………………………………………………27
4.12.2: Tensile..………………………………………………………………………….28
4.12.3: Beam Load………………………………………………………………………29
4.12.4: Vibration………………………………………………………………………...30
4.12.5: Compression…………………………………………………………………….31
4.12.6: Structural………………………………………………………………………...32
4.12.7: Electrical………………………………………………………………………...33
4.13: Final Inspection........................................................................................................34
4.14: Packing and Despatch..............................................................................................35
Chapter 5: ELECTRICAL UTILITY…….………………..........................................36
4.15: KV Electrical Switch Yard 33 ................................................................................37
4.16: Electrical 415 VLT Distribution…..........................................................................38
4.17: APFC- PANEL (Maintains 0.999)………………………………………………...39
4.18: Synchronization- Dark Lamp……………………………………………………...40
4.19: Standby D.G Sets 1000 KVA……………………………………………………..41
Conclusion........................................................................................................................42
References........................................................................................................................43
V
Chapter 1
INTRODUCTION
In the mid-1980s a Dutch fellow named Guido van Rossum was working on an
educational project to build a language for new coders called ABC. As a result of
working on this project, Van Rossum became interested in language design, and that’s
when he started working on Python. He made some unusual decisions, which really set
Python apart from the zeitgeist at that time, and continue to make the language special
today.
One of Van Rossum’s decisions was to make indentation meaningful, which is unusual
in programming languages. Critics who thought this would make the language hard to
use didn’t receive the idea very well, but this feature is part of the reason why Python is
both readable and popular. Python syntax is very similar to English, so it’s intuitive,
which helps you understand what’s going on. You don't have to look up what symbols
mean when you use Python. The language constructs enable the user to write clear
programs on both a small and large scale. The most important feature in Python being it
supports multiple programming paradigms, including object-oriented, imperative and
functional programming or procedural styles. Python supports a dynamic type system
and automatic memory management and has a large and comprehensive standard library.
Python's development is conducted largely through the Python Enhancement
Proposal(PEP) process. The PEP process is the primary mechanism for proposing major
new features, for collecting feedback on an issue, and for documenting the design
decisions that have gone into Python. Outstanding PEPs are commented and reviewed by
the Python Community.
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.Python is a widely used
general-purpos
interpreted
dynamic programming language.
FEATURES OF PYTHON
Easy to code
Python is high level programming language. Python is very easy to learn language as
compared to other language like c, c#, java script, java etc. It is very easy to code in
python language and anybody can learn python basic in few hours or days. It is also
developer-friendly language.
Python language is freely available at official website since, it is open-source; this means
that source code is also available to the public. So, you can download it as, use it as well
as share it.
Object-Oriented Language
Graphical Users interfaces can be made using a module such as PyQt5, PyQt4,
wxPython or Tk in python. PyQt5 is the most popular option for creating graphical apps
with Python.
High-Level Language
Extensible featur
Python is a Extensible language. We can write some python code into c or c++ language
and also, we can compile that code in c/c++ language.
Python is also an integrated language because we can easily integrated python with
other language like c, c++ etc.
Interpreted Language
Python is an Interpreted Language because python code is executed line by line at a time
like other language c, c++, java etc there is no need to compile python code this makes it
easier to debug our code. The source code of python is converted into an immediate form
called byte code.
Python has a large standard library which provides rich set of module and functions so
you do not have to write your own code for every single thing. There are many libraries
present in python for such as regular expressions, unit testing, web browsers etc.
Python is dynamically-typed language. That means the type (for example- int, double,
long etc) for a variable is decided at run time not in advance because of this feature we
don’t need to specify the type of variable.
Chapter-2
EXECUTION STEPS
When we compile a Python program, the python compiler converts the Python source
code into another code called byte code. Byte code is a fixed set of instructions that
represent different types of operations. This code can run on any Operating System and
hardware. So mainly, byte code instructions are platform-independent.
The size of each byte code instruction is one byte, and that's why they are called the
name byte code.
Now we need to convert the byte code to machine understandable code, which
comprises 0s and 1s. This machine understandable code is called machine code.
So Python uses an interpreter called PVM (Python Virtual Machine), which understands
the byte code and converts it into machine code.
To see the byte code instructions created by the python compiler before they are
executed by the PVM, execute the following command.
Here -m represents the module named dis. This module is also known as 'disassembler'
that displays the byte code in the human-understandable format.
The above command will display the byte code of the test.pyc file creates during the
compilation of the test.py file.
Interactive shell
The term "interactive" traces back to the Latin expression "inter agere". The verb "agere"
means amongst other things "to do something" and "to act", while "inter" denotes the
spatial and temporal position to things and events, i.e., "between" or "among" objects,
persons, and events. So "inter agere" means "to act between" or "to act among" these.
With this in mind, we can say that the interactive shell is between the user and the
operating system (e.g. Linux, Unix, Windows or others). Instead of an operating system
an interpreter can be used for a programming language like Python as well. The Python
interpreter can be used from an interactive shell.
The interactive shell is also interactive in the way that it stands between the commands
or
5
actions and their execution. In other words, the shell waits for commands from the user,
which it executes and returns the result of the execution. Afterwards, the shell waits for
the next input
A shell in biology is a calcium carbonate "wall" which protects snails or mussels from its
environment or its enemies. Similarly, a shell in operating systems lies between the
kernel of the operating system and the user. It's a "protection" in both directions. The
user doesn't have to use the complicated basic functions of the OS but is capable of using
the interactive shell which is relatively simple and easy to understand. The kernel is
protected from unintentional and incorrect usages of system functions.
Python offers a comfortable command line interface with the Python Shell, which is also
known as the "Python Interactive Shell". It looks like the term "Interactive Shell" is a
tautology, because "shell" is interactive on its own
Although running a Python script using the terminal or your favorite text editor is
straightforward, there are some situations in which you will prefer to hide all the code
written in the script (.py) inside an executable file (.exe).
Maybe you need to send the script to someone who doesn’t code at all or you might need
to schedule a job that runs a.exe at a specific time on your computer. Whatever the
situation.
The first option offers a nice GUI (graphical user interface) that takes care of all the stuff
necessary to convert your Python script into an executable file.
6
To install the last version of auto-py-to-exe, just open up a terminal and run the following
command.
pip install auto-py-to-exe
Once you install auto-py-to-exe, making an executable file is as easy as writing the
following command.
Auto-py-to-exe
Browse the script you wish to convert and add it to the “Script Location” field
Feel free to choose any script you want. However, if your script needs to read a path make
sure that you use absolute paths since relative paths won’t behave as you might expect
with executable files. If necessary, include the following line of code below to know
where the executable file is located and make the necessary changes to your script so you
read/export files on the right directory.
Now we have to choose whether we want to create “one directory” or “one file.” The first
creates a directory with all the dependencies your script needs to run (including the
executable file), while the second creates only a single executable file.
Now it’s time to choose whether the console will be displayed or not. If you choose
“Console Based,” the console will open after running the executable file, which is
recommended if your script generates console-based outputs. However, if you don’t want
to show the console outputs when running the executable file, choose “Window Based”
7
You can add an icon, add files that your script needs to run, and more! However, for this
example, I’ll only modify the path where the executable file will be exported. To do so,
click on the “Setting” option and browse the output directory you wish.
To convert the .py file to .exe just click the blue button you see below.
Something really important that auto-py-to-exe shows above the convert button is the
code that pyinstaller (the main library and second option in this guide to make .exe files)
needs to create an executable file behind that fancy GUI you see on the screen.
Once the process is finished the executable file should be located in the output directory
you set in step 4!
This option fits better for those who prefer to quickly create an executable file running a
command on the terminal.
If you’re used to working with the terminal, then the PyInstaller library will be the best
option. To install PyInstaller follow these steps.
8
Step 3: Once you‘re in the right directory, write a command with the
following syntaxpyinstaller --onefile name_of_script.py in the terminal to
make the script executable.
The command used in step 3 is similar to the code shown in the step 5 picture for the
auto-py-to-exe option. You can play a little bit with the GUI offered by auto-py-to-exe to
get used to the many options you can add to this command.
After running the command, you should see a message that says “completed
successfully.” In the directory where your script is located, a folder named “dist” should
have been created. Inside the folder, you’ll find the standalone executable!
DLE is Python's Integrated Development and Learning Environment. IDLE has the
following features: coded in 100% pure Python, using the tkinter GUI toolkit. cross-
Chapter 3
DATA TYPES AND OPERATIONS
A data type, in programming, is a classification that specifies which type of value a
variable has and what type of mathematical, relational or logical operations can be
applied to it without causing an error.
3.1: Numbers
Number data types store numeric values. They are immutable data types, which means
that changing the value of a number data type results in a newly allocated object.
int
float
complex
Int type
int (Integers) are the whole number, including negative numbers but not fractions. In
Python, there is no limit to how long an integer value can be.
num = -10
print(type(num))
output
<class 'int'>
10
Float type
This is a real number with floating-point representation. It is specified by
a decimal point. Optionally, the character e or E followed by a positive or
num = 7/8
print(type(num))
output
<class 'float'>
Complex type
A complex number is a number that consists of the real and imaginary parts. For
example, 2 + 3j is a complex number where 2 is the real component, and 3 multiplied
by j is an imaginary part.
num = 7 + 14j
print(type(num))
output
<class
'complex'>
11
3.2 strings
Strings in python are surrounded by either single quotation marks, or double quotation
marks.
print("Welcome")
print('Welcome')
output
WelcomeWelcome
Assigning a string to a variable is done with the variable name followed by an equal sign
and the string:
a = "Welcome"
print(a)
output
Welcome
12
Multiline Strings
You can assign a multiline string to a variable by using three quotes.
print(a)
Output
And they were moving closely
3.3 List
Lists are one of 4 built-in data types in Python used to store collections of data, the other
3 are Tuple, Set, and Dictionary, all with different qualities and usage.Lists are created
using square brackets:
output
List items are indexed, the first item has index [0], the second item has index [1] etc.
13
Ordered
When we say that lists are ordered, it means that the items have a
defined order, and that order will not change.
If you add new items to a list, the new items will be placed at the end of
the list.
Changeable
The list is changeable, meaning that we can change, add, and remove
items in a list after it has been created.
Allow Duplicates
Since lists are indexed, lists can have items with the same value:
output
3.4 Tuple
Tuples are used to store multiple items in a single variable. Tuple is one of 4 built-in
data types in Python used to store collections of data, the other 3 are List, Set, and
Dictionary, all with different qualities and usage. A tuple is a collection which is ordered
and unchangeable.
14
Example:
Var = (“Geeks”, “for”, “Geeks”)
Print(varr)
Output
(“Geeks”,”for”, ”Geeks”)
3.5 Dictionary
“model”: “Mustang”,
“year”: 1964}
Print(thisdict)
Output {
“brand”: “Ford”,
“model”: “Mustang”,
“year”: 1964
15
Chapter 4
STATEMENTS AND SYNTAX IN PYTHON
4.1: Operators
Operators are used to perform operations on values and variables. These are the special
symbols that carry out arithmetic, logical, bitwise computations. The value the operator
operates on is known as Operand.
16
4.1.3: Comparisons operator
17
4.1.5 Identity operator
Equals: a == b
Not Equals: a != b
Less than: a < b
Less than or equal to: a <= b
Greater than: a > b
Greater than or equal to: a >= b
4.2.1: If statement
Age=20
if 18<=age:
age = 16
if 18 <=age:
else:
Output
“You can not Eligible to Vote”
20
4.2.3: Nested condition
Num=1
if num<10:
if num==1:
else:
else:
4.3 Loops
4.3.1 While loop
With the while loop we can execute a set of statements as long as a condition is true.
I=1
While ( I < 7) :
Print(i)
I ++
1
Output
2
6
21
A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary,
a set, or a string).
This is less like the for keyword in other programming languages, and works more like
an iterator method as found in other object-orientated programming languages.
With the for loop we can execute a set of statements, once for each item in a list, tuple,
set etc.
For x in fruits:
Print(x)
animal
Output
tree
house
In Python programming language there are two types of loops which are for loop and
while loop. Using these loops we can create nested loops in Python. Nested loops mean
loops inside a loop. For example, while loop inside the for loop, for loop inside the for
loop, etc.
22
CONCLUSION
REFERENCES
[1]http://www.w3schools.com/python/
[2]http://www.geeksforgeeks.com/python/