0% found this document useful (0 votes)
11 views18 pages

My Report PDF

This report details a summer internship training on Python and data science, completed by Akarsh Srivastava as part of his Bachelor's degree in Electronics and Communication. It covers various aspects of Python, including its features, applications, advantages, and limitations, as well as a project on creating a dice roller using Python. The report emphasizes the practical implementation of Python in developing applications and the learning experience gained during the training.

Uploaded by

Shikhar Singh
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)
11 views18 pages

My Report PDF

This report details a summer internship training on Python and data science, completed by Akarsh Srivastava as part of his Bachelor's degree in Electronics and Communication. It covers various aspects of Python, including its features, applications, advantages, and limitations, as well as a project on creating a dice roller using Python. The report emphasizes the practical implementation of Python in developing applications and the learning experience gained during the training.

Uploaded by

Shikhar Singh
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/ 18

SUMMER INTERNSHIP TRAINING

REPORT PYTHON AND PROJECT WORK


A Report is submitted
In Partial Fulfillment of the Requirements
For the Degree of

BACHELORS OF TECHNOLOGY
In
DEPARTMENT OF ELECTRONICS AND
COMMUNICATION
By
Akarsh Srivastava
2300100310009

to the
FACULTY OF UNITED COLLEGE OF ENGINEERING
AND RESEARCH
DR. APJ ABDUL KALAM TECHNICAL
UNIVERSITY LUCKNOW

1|Page
STUDENT DECLARATION

I, Akarsh Srivastava , hereby declare that the presented report


oft raining tiled “PYTHON AND DATA SCIENCE”,is
uniquely prepared by me after the completion of 60 hrs training
authorized by Growth Ninja

AKARSH SRIVASTAVA
(2300100310009)
DEPARTMENT OF ELECTRONICS &

COMMUNICATION

UNITED COLLEGE & ENGINEERING & RESEARCH

2|Page
ACKNOWLEGEMENT
“MORE YOU READ THE MORE YOU KNOW, THE MORE YOU KNOW,
THE SMARTER YOU GROW, THE SMARTER YOU GROW, THE
STRONGER YOUR VOICE, THROUGH LEARNED KNOWLEDGE FROM
INSTITUTE AND TEACHERS.”

Learning python and doing project work has been a great experience for me. For
this, I wish to express me sincere gratitude to my all teachers including HOD Nandita
Pradhan Ma’am, Vijit Srivastava(C. I) and our python summer training mentor Mahima
Arora Ma’am and other teaching faculty members for their constant support , motivation
and guidance in the right direction to make this project a dream come true.

Thanking You,
Yours faithfully,
Akarsh Srivastava

Roll no: 2300100310009

3|Page
CONTENTS
1. PREAMBLE
2. FEATURES OF PYTHON
3. HISTORY OF PYTHON
4. APPLICATION OF PYTHON
5. USES OF PYTHON IN DATA ANALYTICS
6.USES OF PYTHON
7. ADVANTAGES OR BENEFITS OF PYTHON
8. LIMITATIONS OR DISADVANATGES OF PYTHON
9. HOW TO USE PYTHON
10. PYTHON 2 VS PYTHON 3
11. GUI IN PYTHON
12. WHY TKINTER
13. IMPORTANT METHODS IN TKINTER
14. PROJECT NAME CHATBOT CREATION USING PYTHON
15. TYPES OF CHATBOTS
16. METHODOLOGY
17. WIGDETS USED IN THIS PROJECT
18. OTHER LIBRARY UESD
19. VARIABLES USED
20. PYTHON CODE
21. OUTPUT
22. CONCLUSION
23. REFERENCE

4|Page
PREAMBLE
Python is one most popular programming language nowadays, It is also called as
Multi purpose programming language. (as it is not intended to work in a particular
area)
It is high level , general purpose programming language . Its is available across many
platforms like
– Windows, LINUX, Mac Os.
As it is easy to code and presence of OOPS(Object Oriented Programing) its helps
us develop and demonstrate applications easily.
It comes with a rich set of built in libraries. Hosting solutions for Python applications
are also cheap. It is considered as a ‘scripting’ language, but is much more than that.
Its versatile and easy to code nature helps not only to handle files but also
develop massively trafficked websites for cooperate IT organizations.
Name after ‘Monty Python’, a comedy group, depicting its ‘fun’ philosophy •
Open source and interpreted language.
Python knowledge is on high trending currently.

FEATURES OF PYTHON
• Python focusses on readability, coherence and simplicity.
• Python code is usually very compact.
• Python code is portable across OS platforms.
• Huge collection of libraries available for use by developers.

5|Page
Some of the prominent and significant features of Python are:
 Easy to Code
o Its is a developer friendly language .
 Open Source and Free
o It means anyone can create and contribute to the python environment.
 Support for GUI
o Supports GUI thus adding visual impact to the code
 Object-Oriented Approach
o Python recognizes the concept of class and object encapsulation thus allowing programs to
be efficient in the long run.
 High-Level Language

o when one codes in Python one don’t need to be aware of the coding structure, architecture
as well as memory.

6|Page
HISTORY OF PYTHON
• Designed By -Guido Van Rossum ( occupation – Computer Programmer and Author )
• Developer – Python Software Foundation
• Conceived – Late 1980’s
• First appeared – 1991 (25 years ago)
• Implementation started – Dec 1989
• File extention - .py , .pyc , .pyd , .pyw , .pyz

Official website – www.python.org

APPLICATIONS OF PYTHON
Some the important real world and traditional uses of this highly dynamic language are as follows: -
 Web Development.
 Game Development.
 Scientific and Numeric Applications.
 Artificial Intelligence.
 Machine Learning.
 Software Development.
 Language Development.
• Embedded Scripting.
• Image processing.
• GUI’s • Database Programming.
• Internet Scripting.
• System Administration.
• Automation.
USES OF PYTHON IN DATA ANALYTICS
• Weather Forecasting
• Scientific analysis
• Ad targetting
• Risk Management Analysis

7|Page
• Natural Language Processing and Generation

USERS OF PYTHON
•YouTube: Originally written in Python and mysql
which is a freely available open source Relational
Database Management system (RDBMS).

•Yahoo!: Yahoo acquired Four11, whose address and mapping lookup services are implemented
in Python
•Yahoo! Maps: Uses Python .
•DropBox: A cloud based file hosting service runs on Python .
•Google: Many components of the Google spider and search engine are written in Python be
of its easy coding.

HOW TO USE PYTHON


Interactive mode programming

Invoking the interpreter without passing a script file.


It involves running your codes directly on Python shell which can be evaluate from the terminal of
the operating system.
It is suitable for running few lines of codes.

Script mode programming (GUI)

Invoking the interpreter with a script parameter begains execution continues until the script is
finished. When the script is finished, the interpreter is no longer active.
In the script mode programming, we have to create a file, give it a name with the extension .py

Python 2 or Python 3?
• We are currently using Python 3.5+
• Library support is more for Python 2.7 as it has been around longer .
• The future will be going to be Python 3+
• Development and porting of libraries is an ongoing process
• There are several key syntactic changes so advisable to be with 3.5
PYTHON 3.X

8|Page
• In integer division it always returns integer like 7/5 (Result = 1)
• Implicit str type ASCII.
• Print without Parenthesis.
• Xrange () exist.

PYTHON 2.X
• In integer division it always returns without using floor like 7/5 (Result=1.4)
• Implicit str type is Unicode.
• Print function with parenthesis.
• Xrange() does not exist.

ADVANTAGES OR BENEFITS OF PYTHON


Extensive Support Libraries
• Python provides a wide range of standard libraries that include cables, Internet, web application
tools, operating system connectors and agreements.

Integration factor
• Integrates Enterprise Application Integration makes it easy to develop Web services.

Improved Production System


• Python Language has comprehensive support libraries and clean-focused projects that increase the
productivity of the program twice or ten times while using languages such as Java, VB, Perl, C, C
++, SQL and C #.
Production

• With its strong process integration features and enhanced control capabilities that contribute to
addressing the increased speed of multiple applications and the productivity of applications.

9|Page
LIMITATIONS OR DISADVANATGES OF PYTHON
Difficulty in using other languages
• Python enthusiasts are familiar with its features and its extensive libraries, so they face difficulty
learning or working in other programming languages such as Java, VB, Perl, C, C ++, SQL and C #.
Weak in Mobile Computing
• Python language has made its presence on many desktop platforms and servers, but is seen as a
weak language for a portable computer. That's why there are very few mobile apps built into it like
Carbonnelle.
It's moving slowly
• Python language works with the help of an interpreter instead of a compiler, which slows it down
because integration and performance help it to work normally. On the other hand, it may appear to be
faster for most web applications as well.
Advanced Data Access Layers
• Compared with other popular technologies such as JDBC and ODBC, Python's database access
layer is found to be less advanced and less functional. However, it cannot be applied to businesses
that require smooth communication of complex legacy data.

10 | P a g e
GUI IN PYTHON PYTHON
Python has many options for Graphical user interface development. The most popular amoung them
are listed below:-

 Tkinter − Tkinter is the Python interface to the Tk GUI toolkit shipped with Python.
 wxPython − This is an open-source Python interface for wxWindows .
 JPython − JPython is a Python port for Java which gives Python scripts seamless access t
class libraries on the local machine
Thus, there are many other interfaces available also.

Thus, there are many other interfaces available also.

WHY TKINTER
• TKINTER IS A STANDARD GUI LIBRAUARY
• IT HELPS US QUICKLY CREATE VARIOUS GUI BASED
APPLICATIONS

Python contains a heap of user interface elements. Tkinter is that the solely elements designed by
victimization python libraries itself. Some the necessary feature are:-
• It’s cross-platform, therefore the same code works on Windows, macOS, and Linux.
• Applications inbuilt Tkinter sounds like they run on the inbuilt that platform itself. Although
Tkinter is taken into account the de-facto Python user interface framework, it’s not while not
criticism.

11 | P a g e
IMPORTANT METHODS IN TKINTER

The most important methods required to make a simple GUI application are:-
1. Tk(): It is used to create a main window. One can also change
the name of the window.
2. mainloop():
There is a method known by the name mainloop() is used when your
application is ready to run. It runs an infinite loop and wait for the all the
tasks to get completed and until wants to exit the window.

12 | P a g e
Project Information-Dice Roller Using Python

A Python Dice Roller project simulates rolling one or more dice, typically generating random results to
mimic the outcome of physical dice rolls. Here's a brief overview:
Key Features:
1. Random Number Generation: Utilizes Python's random module to simulate dice rolls by generating
random numbers between 1 and the specified number of sides (e.g., 1 to 6 for a standard die).
2. Customizable: The user can choose how many dice to roll and the number of sides on each die.
3. Interactive: The program often prompts the user for input (e.g., how many dice to roll) and displays
the result.
Python's prominence in the field of artificial intelligence and natural language processing makes it an
ideal choice for chatbot development. In this report, we will cover fundamental concepts, delve into the
intricacies of designing conversational flow, explore advanced features, and discuss the deployment
and
testing of chatbots.

As we embark on this journey, we will not only learn about the theoretical aspects but also
engage in
practical implementations. By the end, you should have a comprehensive understanding of
creating robust
chatbots using Python, ready to tackle real-world challenges and contribute to the evolving
landscape of
conversational interfaces

13 | P a g e
METHODOLOGY

Methodology for a Python Dice Roller Project


The methodology for building a Python Dice Roller project can be broken down into several stages, focusing on design,
development, testing, and enhancements.
1. Requirements Gathering
Objective: Define the core functionality the dice roller should provide.
Ability to roll one or more dice.
Customizable number of sides per die.
Display the individual and total results.
Tools and Libraries:
Python’s random module for random number generation.
Optional: tkinter or other GUI libraries for a user interface.
2. Design
Input/Output Flow:
The user will input the number of dice and sides.
The program will output the rolled numbers and optionally, the sum of the results.
Function Design:
roll_dice(sides, num_rolls): A function to generate the dice rolls.
The user input should be validated (e.g., ensuring positive integers).
User Interface (if using GUI):
Buttons for initiating the roll.
Text fields for input (number of dice and sides).
A display area to show results.
3. Implementation
Step 1: Import necessary libraries (like random).
Step 2: Define the function to simulate dice rolls using random.randint().
Step 3: Get user input for the number of dice and sides.
Step 4: Display the results in a clear format (either in the console or a GUI window).
Step 5: Implement the option to roll again or quit.
4. Testing
Unit Testing: Test individual functions, such as the dice rolling function, to ensure correct random number generation.
For example, ensure that the dice roll results are within the specified range.
User Testing: Verify the input handling and output display, making sure the program is user-friendly and free of errors.
Edge Case Testing: Test inputs like 0 dice or negative sides to ensure the program responds appropriately.
5. Enhancements (Optional)
Multiple Dice Rolls at Once: Allow the user to roll different dice (e.g., 3 dice with 6 sides and 2 dice with 20 sides) in one
go.
Graphical User Interface (GUI): If you want to take it further, implement a GUI for better user interaction using tkinter or
PyQt.
Animation: Add a dice roll animation to make it more visually appealing.
Advanced Features:
Track statistics like the most frequent roll.
Implement additional dice types (e.g., 4-sided dice, 10-sided dice).
Add a feature to simulate dice with different probabilities (e.g., weighted dice).
6. Documentation
Provide a simple user manual or instructions for running the dice roller.
Comment the code to explain key sections of the implementation.
By following this methodology, you'll have a systematic approach to developing the Python Dice Roller project, ensuring it's
functional, user-friendly, and ready for further expansion or improvements.

16 | P a g e
PYTHON CODE
import random

# Function to roll dice


def roll_dice(sides, num_rolls):
rolls = [random.randint(1, sides) for _ in range(num_rolls)]
return rolls

# Main function
def main():
print("Welcome to the Dice Roller!")

# User input for number of dice and sides


try:
num_dice = int(input("Enter the number of dice to roll: "))
sides = int(input("Enter the number of sides on each die: "))

if num_dice <= 0 or sides <= 0:


print("Please enter positive integers for number of dice and sides.")
return

# Rolling the dice


results = roll_dice(sides, num_dice)

# Displaying the result


print(f"Results of rolling {num_dice} dice with {sides} sides: {results}")
print(f"Total: {sum(results)}")

except ValueError:
print("Invalid input! Please enter integers.")

# Run the program


if __name__ == "__main__":
main()

20 | P a g e
OUTPUT
CONCLUSION

The Python Dice Roller project serves as a great hands-on exercise


for beginners, offering an opportunity to practice core programming
concepts such as random number generation, user input handling,
loops, and functions. By following the methodology outlined, the
project can be developed in a structured way, with clear steps for
planning, coding, testing, and enhancement.
Upon completion, you will have a functional dice roller that
simulates the randomness of physical dice, while allowing for user
customization in terms of the number of dice and sides.
Additionally, further enhancements such as adding a graphical user
interface (GUI) or advanced features like tracking statistics can
make the project more interactive and visually appealing.
This project not only solidifies your understanding of Python
fundamentals but also provides a foundation that can be expanded
upon for more complex applications in game development or
simulation software.

23 | P a g e
REFERENCE

1 Python - Tkinter Label - Tutorialspoint


.
2 Python Tutorial (w3schools.com)
.
3 Python Applications - javatpoint
.
4
.
5
.

24 | P a g e

You might also like