Python Internship
Python Internship
ABSTRACT
Since I have a keen interest in knowing new things especially related to the area of Web
Development, I selected a topic related to area of this field. As we want to enhance our career from
Web Development which is also our core subject, the research made by us to complete this project
will prove to be very helpful. The main objective of our project on the topic “Full Stack Python ” is to
study the depth knowledge about the behavior and designing of different Web sites/pages. With the
use of PYcharm. This internship training program focuses on Full Stack Python development,
offering participants comprehensive exposure to both front-end and back-end technologies. Designed
for aspiring software developers, this program aims to equip interns with the skills necessary to build
dynamic, responsive, and scalable web applications using Python as the primary programming
language.
COMPANY PROFILE:
INTERFACE INFOSYS
Established in 2012, we take pleasure in introducing ourselves as a leading and growthoriented web
design and development company that provides solutions according to your needs and
expectations.Our team of experts always succeeds in giving completely new, professional and cost
effective web based solutions.At Web Development System,we offer complete web development
consulting, right from the conceptualization, design, development, integration,and implementation to
maintenance. The company's objective is to help the clients in structuring and implementing the most
effective means to expand their business online with strong marketable and optimized solutions and
achieving practical results. To this end, the company's professionals apply technical, industry and
process knowledge to help the client face their business challenges and thus grow. “Interface Infosys
has been making a big difference in the website design and development business .We do hosting,
branding, website design, software development, search engine optimization, Digital marketing and a
lot more. Our team of professionals is always ready to take on any task that would help."
“We have been in this industry for more than a decade now and we are shaping up to be the best
service provider online and even offline. Our pool of satisfied customers can speak for us. We work
towards the ultimate goal of each and every business, making them a name to reckon in highly
competitive world Our Approach " Clients hold the highest value for Interface Infosys . Hence, our
movements are always geared towards client satisfaction. We never rest until we see wide smiles on
our clients' faces, signaling fulfilment in what we have done to their businesses. We takes its cues
from the desires and the requirements of a specific client. "
Team of skilled software developers who have vast experience on successful complex
projects.
Team of Android Developers with latest ideas and solutions for mobile apps.
Highly Talented and Experienced team of PHP programmers.
ecommerce experts of the team are having extensive experience on Magento and
other ecommerce platforms
Dedicated Expert PHP programmers to work over almost any PHP framework like
cake PHP, codeignitor, zend etc.
Graphic designers that posses a lucrative approach to each project with a blend of
technology.
SEO experts to push our clients website to the highest ranking with a focus on brand
creation.
Experienced project managers to bridge the gap between team and clients.
Network Engineers that ensures smooth connection within the organization.
Quality Testers that posses Eagle’s eye for detecting bugs and errors.
Dedicated support team that is always up to cater the issues of our clients.
For each project we receive, our dedicated team always focus on following the
industry standards and base rules that are company has compiled after thorough
testing and research. These adopted ethics make our company one of the leading
web development company on the grounds of USA, UK, Europe, Australia and
India.
CHAPTER -I
However, a wide array of people can benefit from Training Internships in order to receive real
world experience and develop their skills.
An objective for this position should emphasize the skills you already possess in the area and
your interest in learning more Internships are utilized in a number of different career fields,
including architecture, engineering, healthcare, economics, advertising and many more.
Some internship is used to allow individuals to perform scientific research while others are
specifically designed to allow people to gain first-hand experience working.
The Student Industrial Work Experience Scheme is an exercise carried out within a period of
One month in the third year of an Undergraduate Programme. The exercise was established to bridge
the gap between the industrial world and the academic world.
Need:-
In-plant training provides the industrial exposure to the students how to face the industry
once they put out from the campus. The practical knowledge is essential for all students to get
success in their job. Once the student steps in to industry they should be ready to face competitive
world with knowledge. The core competence area extending its boundary daily as technology grows.
Students needs to update day-to-day stub from various innovative technologies. Job opportunity for
students who has certificate on in-plant training is high compare to non-train students, because the
company will know that student’s knowledge will be busted by in-plant training.
Scope:-
One objective of in-plant training is to help the student bridge the gap between academic
theory and practical application and allow you the opportunity to explore a career in any field. To
observe the conditions of the different departments and the opportunities those are available. IN-plant
training provides opportunity to interact with people who have the inside track and chance to build
network within industry. The main reason behind making a or researching this project is to know how
the management works out to their employees and their main motto is that-
Achieve goals
Gain a positive perspective
Create the power to change
Build self-esteem and capability
Manage their own development
Objectives:-
Course Objectives:
Internship training is a learning opportunity for students. Students should therefore receive feedback
on their performance so that they can grow professionally. Overall professional development of
Computer Science students is the need of the day for enabling them to sustain in competitive global
environment.
Limitation
The time span for the project was very short which was of two weeks, which itself act as
constraint, moreover, studying the guidelines and applied it practically with in such a short time
span was a task of great pressure.
INTERNSHIP TRAINING
Smc Technologiess is the software support company and training intuition, it has strong team of
technology specialist tends to build a wide range of application in open source and data security. The reliable
data partner who build on your network extensively with reliability. The professionals who build the client
network with committed quality deliverables on time. Passion towards work, innovation in technology,
sustainability at every hardship, the strong learning curve on knowledge source, effective project management
skills are the key essentials of our team. Self-inspiration on data!”
2.2 Introduction:
We are one of the most reputed website designers and digital marketing partners in Coimbatore. Our
services will equip small business owners and start-ups to reap the benefits at a faster pace. Are you
seeking for a faithful and best web design company in Coimbatore, consider Smc Technologiess. We
work hard to bring out what our customer needs on their business website. We have skilled designers
and an enthusiastic developing team to provide the best web services to our customers.
Building a great website is a smart investment for any business. It helps in growing the business
online. Every website has a purpose and business goals to achieve. We devote ourselves to collecting
customer requirements and sticking to them while serving them. We specialize in creating wonderful
yet functional and progressive web applications to cater to your business needs. We ensure to bring
out cent percent of what we have promised before making the deal.
All the web designs Smc Technologiess, Coimbatore are mobile responsive websites. we do all kinds
of websites and applications at a cheaper price that is perfectly affordable for small and start-up
companies. If you are looking for professional website designers and the best web developers that too
in Coimbatore, Smc Technologiess is the right place to be in touch with. Smc Technologiess cost-
effective and high-quality websites to earn super profits and win over your competitors.
2.3 History:
If you have a business that doesn't require a highly complicated and feature-rich website to be created,
a static website is a right way to go. Static websites are easier to access, simpler to navigate, and also cheaper
to build. Perfect for small businesses, individual profiles, client portfolios, or just personal websites that don't
require too frequent changes. If you need the best web development company in Coimbatore which understand
your needs and give solution to solve the actual problem and not just stuffing more unwanted option and
billing you heavily then smc technologies Incorporation.
Dynamic Websites contain dynamic pages where the content of the web page changes dynamically according
to the user's command. Our dynamic website solutions include database-driven website, e-Commerce website
development, e-business website, knowledge base website, jobs database, ERP solutions, intranet, and extranet.
Bits Incorporation uses the latest updates for better design. We have experienced designers to reach clients
requisite.
RESPONSIVE DESIGN
Responsive design is the approach that suggests that website web development should respond to the
user's behavior and environment based on screen size, platform, and orientation.
we are committed to optimizing user experience through flexible, flawless design strategies. We make
use of the best web technology and techniques and promote your business on multiple platforms to attract your
audience's attention and turn them into loyal customers.
UI / UX DESIGN
Incorporation, the User Interface Design (UI) and User Experience Design (UXD) process is woven around the
client's needs. We concentrate on a genuine understanding of the prerequisites of the client by taking their
opinion ahead of schedule all the while and doing our particular homework before starting the user interface UI
design and user experience design process.
2.4 Vision:
2.5 Mission:
We strive to sustainably generate outstanding value for our customers. To achieve this we develop,
manufacture and sell sensors, components and systems that gather, transfer and process information from
industrial processes. A comprehensive range of services supplements these offerings. In cooperation with
partners, we help our customers to operate their processes for reliability, safety, environmental compatibility
and efficiency.
CHAPTER-III
Python full-stack developer is a web developer who uses Python as their main programming
language to handle all aspects of building a web application. They build the user interface that is the
front end as well as the back end of the website where server logic is stored using Python. For front-
end development, they generally use languages like HTML, CSS, and JavaScript but now a new
front-end Python framework is also used which is named PyScript. For the backend tasks frameworks
like Django or Flask are used. These developers bridge the gap between the client and the server
which ensures the website is fully functional across the entire application.
applications using the Python programming language. They are responsible for designing,
coding, testing, and deploying software solutions. Full Stack Python Developers need to have a strong
understanding of both front-end and back-end development. They should be able to design and
develop user interfaces, as well as create and maintain databases.
On the front-end, they will use HTML, CSS, and JavaScript to design and develop user
interfaces. They will also use frameworks like Django and Flask to create server-side logic. On the
back-end, they will work with databases like MySQL, MongoDB, and PostgreSQL. They will also
use web servers like Apache and NGINX to deploy applications.
In addition to their technical skills, Full Stack Python Developers need to have strong
problem-solving skills. They should be able to think critically and come up with innovative solutions
to challenges. Moreover, they should also be able to work independently and collaborate effectively
with a team of developers.
Purpose and Importance
The purpose of this internship program is to equip participants with the essential skills and knowledge
required to excel in full stack development using Python as the primary programming language. Full
stack development refers to the ability to work on both the front-end (client-side) and back-end
(server-side) portions of web applications. This versatility makes full stack developers highly
valuable in the tech industry, as they can contribute to all stages of the development process, from
designing user interfaces to managing databases and server logic.
SCOPE
OBJECTIVE
Learning path to become a python full-stack engineer/developer implies you can work on both the
front end and back end of a web application. Front-end development is concerned with the appearance
of the program to the user. To put it another way, front-end development is the process of
programming the browser, also known as the client end. Back-end development, on the other hand, is
concerned with the application's logic. Programming the remote server and interfacing with one or
more databases are both part of back-end development (s).
Full Stack Web Developer may work on a project from start to finish, from design to deployment. In
practice, however, this is only practical for extremely modest tasks. A specialist back-end developer
may have a better understanding of back-end development, such as database architecture, but a full-
stack developer has a broader understanding. Full-stack engineers are generalists who assist bridge
the gap between two highly specialized forces: front-end and back-end developers, on a huge real-
world project.
USEFULL SKILL
Python
Since Python is one of the leading programming languages for modern back end web development,
it’s equally valuable for those interested in full stack development. The language is favored not only
for its versatility, but also for its relative simplicity. In fact, Stack Overflow’s 2020 Developer
Survey found that Python was the most wanted programming language by a considerable margin,
thanks to the fact that it supports many different programming styles and is particularly efficient in
data visualization.
HTML
HTML (HyperText Markup Language) is one of the most widely used coding languages in web
development. As a markup language, it refers to the ways in which web pages are linked together and
is primarily used to inform a web browser of how to display a web page’s elements via tags. For
instance, thetag represents a digital document’s displayed header, potentially containing other tags
related to information like a title or relevant link.
CSS
Along with JavaScript and HTML, CSS (Cascading Style Sheets) is consistently one of the most-
used coding languages in front end development, making it an asset to the full stack role. CSS is
primarily used to create an aesthetically pleasing design — specifically the colorand style- based code
added to HTML structural elements. For example, a background-color: lightblue element would set
the site’s user-facing background to light blue.
CSS:
To make websites look attractive and user friendly, we used CSS i.e., Cascading Style Sheets.CSS is
used when we want to specify how an element from HTML document should appear and all the
styling properties are specified using this. There are more than one ways to specify the styling to
HTML document. First one is to embed style tag in head tag of HTML document and other is the
create a document with .CSS extension and link it to corresponding HTML document. I preferred the
later. The styling of an element used different hierarchy such as class and ids. We can manipulate
many properties such as font, color, background, images, size and etc.
BOX MODELLING:
One incredibly important thing to understand about CSS is that everything is a rectangular box.
Everything from text, to buttons, to inputs are represented by a box in CSS. Even if you draw a circle
with CSS, it will still be represented by a box when it is drawn on screen. This box is
composed of multiple parts which in total make up the box model.
• Content: The content of a box is everything inside the box. This is usually some form of text or a
hard coded width and height. Below we have a simple div and everything with the red background
colour is the content of the box.
• Padding: The next portion of the box model is the padding and this comes directly outside the
content. Padding allows you to add extra space to your element without making the content itself
larger. It also maintains the background colour of the element. This is perfect for when you need to
add space between the edge of your background and your element content like with a button.
• Border: The next layer of the box model is the border and the border is the layer that goes between
the padding and the outside of the element. It is also the last part of the box model that contributes to
the overall size of a box.
Margin: The final piece of the box model is margin. Margin is simply the space between different
elements and occurs outside the border. Margin also does not contribute to the actual size of an
element since it is outside the border.
JAVASCRIPT:
JavaScript is a scripting language used to develop web pages. Developed in Netscape, JavaScript
allows developers to create a dynamic and interactive web page to interact with visitors and execute
complex actions. It also enables users to load content into a document without reloading the entire
page. Various JavaScript frameworks are used for developing and building robust web applications.
Popular JavaScript front-end frameworks that help build web apps are React Native, React, Angular
and Value.
RESPONSIVE WEB DESIGN:
Responsive web design is a setup where the server always sends the same HTML code to all devices
and CSS is used to alter the rendering of the page on the device. Responsive Web Design
is about using HTML and CSS to automatically resize, hide, shrink, or enlarge, a website, to make it
look good on all devices (desktops, tablets, and phones). Responsive design serves all devices with
the same code that adjusts for screen size.
BOOTSTRAP:
Bootstrap is a free and open-source tool collection for creating responsive websites and web
applications. It is the most popular HTML, CSS, and JavaScript framework for developing
responsive, mobile-first websites. Nowadays, the websites are perfect for all browsers (IE, Firefox,
and Chrome) and for all sizes of screens (Desktop, Tablets, Phablets, and Phones). All thanks to
Bootstrap developers – Mark Otto and Jacob Thornton of Twitter, though it was later declared to be
an open-source project. By using this framework, we can easily manipulate the styling of any web
page, like font style, text colour, background color, flex, grid system, etc.
Bootstrap Version & Version are the most popular versions.
PYTHON:
Python is a computer programming language often used to build websites and software, automate
tasks, and conduct data analysis. Python is a general-purpose language, meaning it can be used to
create a variety of different programs and isn’t specialized for any specific problems. This versatility,
along with its beginner friendliness, has made it one of the most-used programming languages today.
Python is commonly used for developing websites and software, task automation, data analysis, and
data visualization. Since it’s relatively easy to learn, Python has been adopted by many non-
programmers such as accountants and scientists, for a variety of everyday tasks, like organizing
finances.
FLASK:
Flask comes only with two main components: The Jinja 2 template engine - to help build HTML
templates - and the Werkzeug (a scary German word), a tool that provides HTTP routing support.
Because of its simplicity, Flask is considered a micro framework that doesn't force you
to work with a large predefined set of tools like Django. Instead, Flask comes with the bare minimum,
leaving the developer to decide what tools should be used. For this reason, Flask is considered a more
pythonic framework of the two. The Flask minimalistic approach means that applications can be
developed with minimal boilerplate code and, when handled by experienced
developers, Flask can produce extremely straightforward applications (code wise). However, the
framework flexibility and the available tools allow the application's functionalities to extend as the
project requirements change or evolve.
KEY LEARNINGS
Technology/Methodologies/Algorithms learnt
➢ HTML
➢ CSS
➢ JavaScript
➢ Python
➢ OpenCV
➢ React JS
➢ Flask
Detailed description:
HTML:
HTML stands for Hyper Text Markup Language.HTML is the standard markup language for creating
Web pages.HTML describes the structure of a Web page.HTML consists of a series of
elements.HTML elements tell the browser how to display the content. "Hypertext" refers to links that
connect web pages to one another, either within a single website or between websites. Links are a
fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by
other people, you become an active participant in the World Wide Web.
Simple Structure of HTML
<!DOCTYPE html>
<html><head>
<title>Page Title</title>
</head><body></body>
</html>
HTML (HyperText Markup Language) and CSS (Cascading Style Sheets) are
foundational technologies for web development.
HTML: Provides the structure of the web page by defining elements such as
headings, paragraphs, links, images, and forms.
Example:
HTML (index.html):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<header>
</header>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<section id="home">
<h2>Home Section</h2>
<section id="about">
<h2>About Section</h2>
</section>
<section id="contact">
<h2>Contact Section</h2>
</section>
<footer>
</footer>
</body>
</html>
CSS:
CSS stands for cascading style sheet.CSS is the language we use to style an HTML document.CSS
describes how HTML elements should be displayed. CSS is designed to enable the separation of
content and presentation, including layout, colors, and fonts.[3] This separation
can improve content accessibility; provide more flexibility and control in the specification of
presentation characteristics; enable multiple web pages to share formatting by specifying the relevant
CSS in a separate .css file, which reduces complexity and repetition in the structural content; and
enable the .css file to be cached to improve the page load speed between the pages
that share the file and its formatting.
CSS (styles.css):
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
header {
background-color: #4CAF50;
color: white;
padding: 1em;
text-align: center;
}
nav ul {
list-style-type: none;
padding: 0;
}
nav ul li {
display: inline;
margin-right: 10px;
}
nav ul li a {
text-decoration: none;
color: #333;
}
section {
margin: 20px;
padding: 20px;
background-color: white;
border-radius: 8px;
}
footer {
text-align: center;
padding: 1em;
background-color: #333;
color: white;
position: fixed;
width: 100%;
bottom: 0;
}
JavaScript:
JavaScript is a versatile programming language that allows for dynamic and interactive
behavior on web pages. It is essential for creating responsive user interfaces that can handle user
inputs and update the content without needing to reload the page.
JavaScript is the world's most popular programming language. JavaScript is the programming
language of the Web. JavaScript is easy to learn. JavaScript is a high-level, often just-in-time
compiled language that conforms to the ECMA Script standard. It has dynamic typing, prototype-
based object-orientation, and first-class functions. It is multiparadigm,supporting event-driven,
functional, and imperative programming styles. It has application programming interfaces (APIs) for
working with text, dates, regular expressions, standard data
structures, and the Document Object Model (DOM).
Here’s a basic JavaScript example that adds interactivity to the HTML page.
JavaScript (script.js):
document.addEventListener('DOMContentLoaded', (event) => {
const contactSection = document.getElementById('contact');
contactSection.innerHTML += '<button id="contactButton">Show Alert</button>';
document.getElementById('contactButton').addEventListener('click', () => {
alert('Button clicked!');
});
});
One of JavaScript's key strengths is its ability to manipulate the Document Object Model
(DOM). The DOM is a programming interface for web documents, representing the page so that
programs can change the document structure, style, and content. JavaScript can dynamically update
content, control multimedia, animate images, and much more, making web pages feel more like
native applications.
JavaScript is not limited to simple interactions. It can handle complex tasks such as
performing calculations, validating user inputs to ensure data integrity before it is sent to a server, and
managing data storage using local storage or cookies. Additionally, JavaScript's asynchronous
capabilities, through AJAX (Asynchronous JavaScript and XML) and modern Fetch API, allow web
applications to send and retrieve data from servers without reloading the page. This enables real-time
updates and seamless user experiences, essential for applications like social media platforms, online
chats, and dynamic dashboards.
Moreover, JavaScript has evolved significantly over the years. With the advent of frameworks
and libraries such as React.js, Angular, and Vue.js, developers can build sophisticated single-page
applications (SPAs) with complex user interfaces and smooth navigational experiences. These tools
simplify the development process, enhance performance, and provide a robust structure for large-
scale applications.
Python:
Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its
design philosophy emphasizes code readability, and its syntax allows programmers to express
concepts in fewer lines of code than would be possible in languages such as C++ or Java. The
language provides constructs intended to enable clear programs on both a small and large scale.
Python supports multiple programming paradigms, including object-oriented, imperative and
functional programming or procedural styles. It features a dynamic type system and automatic
memory management and has a large and comprehensive standard library. Python interpreters are
available for installation on many operating systems, allowing Python code execution on a wide
variety of systems.
History of Python
Python was developed by Guido van Rossum in the late eighties and early nineties at the National
Research Institute for Mathematics and Computer Science in the Netherlands.
Python is derived from many other languages, including ABC, Modula-3, C, C++, Algol-68,
SmallTalk, and Unix shell and other scripting languages.
Python is copyrighted. Like Perl, Python source code is now available under the GNU General
Public License (GPL).
Python is now maintained by a core development team at the institute, although Guido van
Rossum still holds a vital role in directing its progress.
# Introduction to Python Programming
• Why do we need Python?
• Program structure in Python
# Execution steps
• Interactive Shell
• Executable or script files.
• User Interface or IDE
WORKING ON PYTHON
Python is known for its general purpose nature that makes it applicable in almost each domain of
software development. Python as a whole can be used in any sphere of development.
Web Applications
We can use Python to develop web applications. It provides libraries to handle internet protocols such
as HTML and XML, JSON, Email processing, request, beautifulSoup, Feedparser etc. It also provides
Frameworks such as Django, Pyramid, Flask e.t.c to design and delelop web based applications. Some
important developments are: PythonWikiEngines, Pocoo, PythonBlogSoftware etc.
Python provides Tk GUI library to develop user interface in python based application. Some other
useful toolkits wxWidgets, Kivy, pyqt that are useable on several platforms. The Kivy is popular for
writing multitouch applications.
Software Development
Python is helpful for software development process. It works as a support language and can be used
for build control and management, testing etc.
Python is popular and widely used in scientific and numeric computing. Some useful library and
package are SciPy, Pandas, IPython etc. SciPy is group of packages of engineering, science and
mathematics.
Business Applications
Python is used to build Bussiness applications like ERP and e-commerce systems. Tryton is a high
level application platform.
Python is awesome to perform multiple tasks and can be used to develop multimedia applications.
Some of real applications are: TimPlayer, cplay etc.
4 Steps:
Install Python
Install Pip
Install VirtualEnv
Install VirtualEnvWrapper-win
Python is an open-source object-oriented programming language. Python is one of the most popular
programming languages in the world. It has a well-organized source code, and it is used for web
applications and numerous other things.
Python is also easy to interface with frameworks. There are several frameworks that allow for easier
customization and less coding. They help developers get the job done faster. With these frameworks,
games, apps, educational programs, and other software can be built faster and better.
1. CherryPy
CherryPy is a minimalist Python web framework. It works on the most recent versions of Python, and
it even runs perfectly on Android. It has been in use for almost ten years. CherryPy allows developers
to run various HTTP servers at the same time and it allows for profiling. It also has a plugin system
that is flexible. Appoptics is one of the best way to check the application performance score.
2. Flask
Flask is a framework that is highly suitable for developers that want to make a standalone app. Flask
comes with the Jinja template engine by default, but developers can choose any template engine or
ORM that is perfect for them. Flask is very useful for writing APIs, endpoints, or RESTful services.
Flask is considered open-ended to unique systems. Developers can create backend systems any way
they want, but it was designed for more open-ended applications.
3. Django
Django is the most popular Python framework. It is an open-source framework that makes things very
fast and scalable. The framework is regularly updated to match the latest versions of Python. Django
supports a lot of database engines and is used by popular websites like Instagram, Pinterest, The
Washington Post and others. Popular comment internet application, Disqus was made using Django.
Django is easy to pick up for beginners. The first release of Django was in 2006, and it has been
expanding since then. Django can be used to build almost any kind of website from social networks to
CMS to wikis to news sites. With Django, you can deliver content in JSON, RSS feeds XML, HTML,
and almost any other format.
4. Pyramid
Pyramid is a Python framework that supports authentication and routing. It is great for developing
large web applications, like CMSs, and it is useful for prototyping a concept and for developers
working on API projects. Pyramid is flexible and can be used for both simple and complex projects.
5. TurboGears
TurboGears is an innovative Python framework. It is a single file app that can be run on Python and
also scaled to a full stack solution. It has a flexible ORM with multi-database support. It can be used
for all forms of simple and advanced projects. The documentation is simple and easy to use. With
TurboGears, you can create a ready-to-extend application in mere minutes.
6. Pylons
Pylons is a framework that makes the tracking of errors easy thanks to its online debugger. It is an
open source framework supported by a lot of talented and experienced developers.
7. Web2py
Web2py is one of the most portable, flexible, and easy to use Python frameworks available. It doesn’t
require any installation or configuration and it uses LDAP for its authentication system. Web2py can
be run off a simple USB flash drive. It supports various database engines, and it has a built-in
ticketing system to help it manage errors. Web2py doesn't support older versions of Python.
USING VARIABLES IN PYTHON
Learn about numeric, string, sequence and dictionary data types and relevant operations
while practicing Python syntax.
Variables do not need to be declared with any particular type, and can even change type after they have
been set.
Example
x = 4 # x is of type int
x = "Sally" # x is now of type str
print(x)
Variable Names
A variable can have a short name (like x and y) or a more descriptive name (age, carname,
total_volume). Rules for Python variables:
Variables can store data of different types, and different types can do different things.
Python has the following data types built-in by default, in these categories:
Text str
Type:
Mapping dict
Type:
PYTHON NUMBERS
int
float
complex
PYTHON CASTING
There may be times when you want to specify a type on to a variable. This can be done with casting.
Python is an object-orientated language, and as such it uses classes to define data types, including its
primitive types.
int() - constructs an integer number from an integer literal, a float literal (by removing all
decimals), or a string literal (providing the string represents a whole number)
float() - constructs a float number from an integer literal, a float literal or a string literal
(providing the string represents a float or an integer)
str() - constructs a string from a wide variety of data types, including strings, integer literals
and float literals
PYTHON STRINGS
STRINGS
Strings in python are surrounded by either single quotation marks, or double quotation marks.
SLICING
You can return a range of characters by using the slice syntax. Specify the start index and the end index,
separated by a colon, to return a part of the string.
STRING FORMAT
As we learned in the Python Variables chapter, we cannot combine strings and numbers like this:
Example
age = 36
txt = "My name is John, I am "+ age
print(txt)
PYTHON OPERATORS
Arithmetic operators
Assignment operators
Comparison operators
Logical operators
Identity operators
Membership operators
Bitwise operators
PYTHON DICTIONARIES
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
DICTIONARY
Dictionaries are written with curly brackets, and have keys and values:
Example
thisdict ={
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
print(thisdict)
Learn how to write programs using conditionals, loops, iterators and generators, functions and
modules and packages.
Python Conditions and If statements
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
These conditions can be used in several ways, most commonly in "if statements" and loops.
while loops
for loops
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.
PYTHON FUNCTIONS
A function is a block of code which only runs when it is called. You can pass data, known as
parameters, into a function.
Creating a Function
Example
def my_function():
print("Hello from a function")
Calling a Function
To call a function, use the function name followed by parenthesis:
Example
def my_function():
print("Hello from a function")
my_function()
ARGUMENTS
Information can be passed into functions as arguments. Arguments are specified after the function
name, inside the parentheses. You can add as many arguments as you want, just separate them with a
comma.
The following example has a function with one argument (fname). When the function is called, we
pass along a first name, which is used inside the function to print the full name:
Example
def my_function(fname):
print(fname +" Refsnes")
my_function("Emil")
my_function("Tobias")
my_function("Linus")
Loop definition
Programming languages provide various control structures that allow for more complicated
execution paths.
A loop statement allows us to execute a statement or group of statements multiple times. The
following diagram illustrates a loop statement −
Python programming language provides following types of loops to handle looping requirements.
For Loop:
>>> for mynum in [1, 2, 3, 4, 5]:
Hello 1
Hello 2
Hello 3
Hello 4
Hello 5
While Loop:
Conditional Statements:
Decision making is anticipation of conditions occurring while execution of the program and
specifying actions taken according to the conditions. Decision structures evaluate multiple
expressions which produce TRUE or FALSE as outcome. You need to determine which action to
take and which statements to execute if outcome is TRUE or FALSE otherwise
Example:
If Statement:
a=33
b=200
If b>a:
print(“b”)
If...Else Statement:
a
=200
b=33
if b>a:
FUNCTION
Function blocks begin with the keyword def followed by the function name and parentheses ( ( )
).
Any input parameters or arguments should be placed within these parentheses. You can
also define parameters inside these parentheses.
The first statement of a function can be an optional statement - the documentation string of the
function.
The code block within every function starts with a colon (:) and is indented.
The statement return [expression] exits a function, optionally passing back an expression to
the caller. A return statement with no arguments is the same as return None.
Syntex:
Def
functionname(parameters):
“function_docstring”
Function_suite
Return[expression]
Example:
Def printme(str):
this print a passed string into this function” print str
return
1. # Function definition is here def
printme( str ):
"This prints a passed string into this function"
print str return;
# Now you can call printme function
printme("I'm first call to user defined function!")
printme("Again second call to the same function")
print (each)
Working of read() mode
There is more than one way to read a file in Python. If you need to extract a string that contains all
characters in the file then we can use file.read().
Creating a file using write() mode
file.close()
There are also various other functions that help to manipulate the files and their
contents
Downloading python
If you don’t already have a copy of Python installed on your computer, you will need to
open up your Internet browser and go to the Python download page
(http://www.python.org/download/).
Now that you are on the download page, select which of the software builds you would
like to download. For the purposes of this article we will use the most up to date version
available (Python 3.4.1).
Once you have clicked on that, you will be taken to a page with a description of all the
new updates and features of 3.4.1, however, you can always read that while the download
is in process. Scroll to the bottom of the page till you find the “Download” section and
click on the link that says “download page.”
Now you will scroll all the way to the bottom of the page and find the
“Windows x86 MSI installer.” If you want to download the 86-64 bit MSI, feel free to
do so. We believe that even if you have a 64-bit operating system installed on your
computer, the 86-bit MSI is preferable. We say this because it will still run well and
sometimes, with the 64- bit architectures, some of the compiled binaries and Python
libraries don’t work well.
Installing Python
Once you have downloaded the Python MSI, simply navigate to the download
location on your computer, double clicking the file and pressing Run when the dialog box
pops up.
If you are the only person who uses your computer, simply leave the “Install for
all users” option selected. If you have multiple accounts on your PC and don’t want to
install it across all accounts, select the “Install just for me” option then press “Next.”
you want to change the install location, feel free to do so; however, it is best to
leave it as is and simply select next, Otherwise...
Scroll down in the window and find the “Add Python.exe to Path” and click on the
small red “x.” Choose the “Will be installed on local hard drive” option then press “Next.”
Now that you have completed the installation process, click on “Finish.
Now that we have successfully completed the installation process and added our
“Environment Variable,” you are ready to create your first basic Python script.
Let’s begin by opening Python’s GUI by pressing “Start” and typing “Python” and
selecting the “IDLE (Python GUI).”
Once the GUI is open, we will begin by using the simplest directive possible. This
is the “print” directive which simply prints whatever you tell it to, into a new line. Start
by typing a print directive like the one shown in the image below or copy and paste this
text then press
“Enter”: print (“Congratulations on executing your first print directive!”)
Python Code Execution
Python’s traditional runtime execution model: source code you type is translated to byte
code, which is then run by the Python Virtual Machine. Your code is automatically
compiled, but then it is interpreted.
Simply, a module is a file consisting of Python code. A module can define functions, classes and
variables. A module can also include runnable code.
Example
The Python code for a module named a name normally resides in a file named aname.py. Here's an
example of a simple module, support.py
return
You can use any Python source file as a module by executing an import statement in some other
Python source file. The import has the following syntax −
import module1[, module2[,... module N]
When the interpreter encounters an import statement, it imports the module if the module is present
in the search path. A search path is a list of directories that the interpreter searches before importing
a module. For example, to import the module support.py, you need to put the following command at
the top of the script −
#!/usr/bin/python
import support
support.print_func("Jerry")
A module is loaded only once, regardless of the number of times it is imported. This prevents the
module execution from happening over and over again if multiple imports occur.
The from...import Statement
Python's from statement lets you import specific attributes from a module into the current
namespace. The from...import has the following syntax −
from modname import name1[, name2[, ... nameN]]
For example, to import the function fibonacci from the module fib, use the following statement −
from fib import fibonacci
This statement does not import the entire module fib into the current namespace; it just introduces
the item fibonacci from the module fib into the global symbol table of the importing module.
Below is the program to create a window by just importing Tkinter and set its title −
lbl.configure(text= res)
btn = ttk.Button(window ,text="Submit").grid(row=4,column=0)
window.mainloop()
On running the above code, we will see the output screen something like −
Now let’s create something from the real world, maybe a loan interest calculator. For that, we need a
couple of items(variables) to be known, like principal amount, loan rate (r), balance (Bs) after s
payments. To calculate loan after s payment, we use the formula in below program −
Ps = ((1+r)^s.Bo) – (((1 + r)^s – 1)/ r)*p
Where −
Rate = Rate of interest like 7.5%
i = rate/100, annual rate in decimal
r = period rate = i/12
Po = Principal amount
Ps = Balance after s payments
s = number of monthly payments
p = period (monthly) payment
So below is the Interest rate calculator program, which will show a pop-up window, where users can
set desired value (loan amount, rate, number of installments) and will get the monthly payment
amount and remaining loan he needs to pay with the help of python tkinter library.
from tkinter import *
fields = ('Annual Rate', 'Number of Payments', 'Loan Principle', 'Monthly Payment', 'Remaining Loan')
def monthly_payment(entries):
# period rate:
r = (float(entries['Annual Rate'].get()) / 100) / 12
print("r", r)
# principal loan:
loan = float(entries['Loan Principle'].get())
n = float(entries['Number of Payments'].get())
remaining_loan = float(entries['Remaining Loan'].get())
q = (1 + r)** n
monthly = r * ( (q * loan - remaining_loan) / ( q - 1 ))
monthly = ("%8.2f" % monthly).strip()
entries['Monthly Payment'].delete(0,END)
entries['Monthly Payment'].insert(0, monthly )
print("Monthly Payment: %f" % float(monthly))
def final_balance(entries):
# period rate:
r = (float(entries['Annual Rate'].get()) / 100) / 12
print("r", r)
# principal loan:
loan = float(entries['Loan Principle'].get())
n = float(entries['Number of Payments'].get())
q = (1 + r)** n
monthly = float(entries['Monthly Payment'].get())
q = (1 + r)** n
remaining = q * loan - ( (q - 1) / r) * monthly
remaining = ("%8.2f" % remaining).strip()
entries['Remaining Loan'].delete(0,END)
entries['Remaining Loan'].insert(0, remaining )
print("Remaining Loan: %f" % float(remaining))
def makeform(root, fields):
entries = {}
for field in fields:
row = Frame(root)
lab = Label(row, width=22, text=field+": ", anchor='w')
ent = Entry(row)
ent.insert(0,"0")
row.pack(side = TOP, fill = X, padx = 5 , pady = 5)
lab.pack(side = LEFT)
ent.pack(side = RIGHT, expand = YES, fill = X)
entries[field] = ent
return entries
if __name__ == '__main__':
root = Tk()
ents = makeform(root, fields)
root.bind('<Return>', (lambda event, e = ents: fetch(e)))
b1 = Button(root, text = 'Final Balance',
command=(lambda e = ents: final_balance(e)))
b1.pack(side = LEFT, padx = 5, pady = 5)
b2 = Button(root, text='Monthly Payment',
command=(lambda e = ents: monthly_payment(e)))
b2.pack(side = LEFT, padx = 5, pady = 5)
b3 = Button(root, text = 'Quit', command = root.quit)
b3.pack(side = LEFT, padx = 5, pady = 5)
root.mainloop()
Output
From above we see the user is able to find the final(remaining) balance and monthly payment by
entering the loan amount, rate and no. of payments.
SCOPE OF PYTHON
1 - Science
- Bioinformatics
2 - System Administration
- Unix
- Web logic
- Web sphere
51
OpenCV:
Computer vision is a process by which we can understand the images and videos how they are
stored and how we can manipulate and retrieve data from them. Computer Vision is the base or
mostly used for Artificial Intelligence. Computer-Vision is playing a major role in self-driving
cars, robotics as well as in photo correction apps.
OpenCV is the huge open-source library for the computer vision, machine learning, and image
processing and now it plays a major role in real-time operation which is very important in
today’s systems. By using it, one can process images and videos to identify objects, faces, or
even handwriting of a human. When it integrated with various libraries, such as NumPy, python
is capable of processing the OpenCV array structure for analysis. To Identify image pattern and
its various features we use vector space and perform mathematical operations on these features.
52
Flask:
Flask (source code) is a Python web framework built with a small core and easytoextend
philosophy. Flask is considered more Pythonic than the Django web framework because in
common situations the equivalent Flask web application is more explicit. Flask is also easy to get
started with as a beginner because there is little boilerplate code for getting a simple app up and
running.
DJANGO :
Django is a widely-used Python web application framework with a "batteries-included"
philosophy. The principle behind batteries-included is that the common functionality for building
web applications should come with the framework instead of as separate libraries.
The Django project's stability, performance and community have grown tremendously over the
past decade since the framework's creation. Detailed tutorials and good practices are readily
available on the web and in books. The framework continues to add significant new functionality
such as database migrations with each release.
I highly recommend the Django framework as a starting place for new Python web developers
because the official documentation and tutorials are some of the best anywhere in software
development. Many cities also have Django-specific groups such as Django District, Django
Boston and San Francisco Django so new developers can get help when they are stuck.
53
Key Features of Django
MVC Architecture:
class Author(models.Model):
name = models.CharField(max_length=100)
birth_date = models.DateField()
class Book(models.Model):
title = models.CharField(max_length=200)
author = models.ForeignKey(Author, on_delete=models.CASCADE)
Admin Interface:
One of Django's standout features is its built-in admin interface, which is
automatically generated based on the project's models. It allows
administrators to manage the site's data through a web-based interface.
54
55
Example of a Simple Django Application
1. Project Setup:
Create a new Django project:
django-admin startproject mysite
cd mysite
2. Create an App:
Create a new app within the project:
python manage.py startapp myapp
3. Define Models:
Define models in myapp/models.py
from django.db import models
class Article(models.Model):
title = models.CharField(max_length=200)
content = models.TextField()
published_date = models.DateTimeField(auto_now_add=True)
def __str__(self):
return self.title
56
Django is a comprehensive web framework that simplifies the process of
building robust and scalable web applications. Its emphasis on reusability,
rapid development, and security makes it a popular choice among
developers. With features like an ORM, admin interface, and powerful
templating engine, Django provides the tools needed to create complex
applications efficiently. Whether you're building a small blog or a large-scale
enterprise application, Django's versatility and powerful features can help
you achieve your goals.
Key Takeaways:
57
CONCLUSION
The industrial training that I want through within the few days brought in new
technology and expanded my knowledge in the IT industry.
I got the opportunity to put known concepts into practice in real project and to learn new
concepts through applying them.
Meeting with deadlines, keeping the code quality, trying various approaches to determine
the best method and finally completing the industrial training with success were
experience that gained throughout the training period.
I know best. Also even if you think your good in something there is always something
new that you haven’t learnt.
PYHTON developer thinks about your future in python development. PYTHON is great
tool for general purpose programming. It is user friendly one can easily understand the
programming techniques.
58
Future Prospects:
With the ever-growing demand for web applications, proficiency in full-stack
development, particularly using Python and Django, positions you well in the
job market. The skills acquired during the internship are highly transferable
and can be applied to various roles, including frontend developer, backend
developer, full-stack developer, and DevOps engineer.
In summary, a full-stack Python internship is a comprehensive learning
journey that bridges the gap between theoretical knowledge and real-world
application. It provides a strong foundation in both frontend and backend
development, preparing you for a successful career in the dynamic field of
web development.
References:-
Django Documentation. Available at:
https://docs.djangoproject.com/en/stable/
Django REST Framework Documentation. Available at:
https://www.django-rest-framework.org/
React.js Documentation. Available at: https://reactjs.org/docs/getting-
started.html
PostgreSQL Documentation. Available at:
https://www.postgresql.org/docs/
Git Documentation. Available at: https://git-scm.com/doc
Docker Documentation. Available at: https://docs.docker.com/get-
started/
Postman Documentation. Available at:
https://learning.postman.com/docs/getting-started/introduction/
https://en.wikipedia.org/wiki/Flask_(web_framework)
https://github.com/jerrysingh181/URL-SHORTENING
https://www.upgrad.com/
59
https://www.fullstackpython.com/flask.html
https://realpython.com/tutorials/flask/
60