Summer Training File BCA 5th Sem
Summer Training File BCA 5th Sem
on
“Python Programming”
by
Rajkumar Singh [2211394040043]
Submitted on Partial Fulfillment of the Requirements for the award of the Degree
of
Submitted to -
Declaration
I hereby declare that the summer training report titled “Python Programming Training,”
submitted to InternPe, is a record of my original work completed during the summer
training program conducted by InternPe.
This report is based on the knowledge and skills acquired during the training and has been
prepared solely for academic and professional purposes. All the information, data, and
content presented herein have been developed or sourced as per the guidelines provided
during the training period, and I have duly acknowledged all external references used.
I affirm that this report has not been submitted elsewhere for any other academic or
professional certification or recognition.
Date:
(Signature)
(I)
(II)
(III)
CERTIFICATE
Signature
Date:
(IV)
(V)
(VI)
Abstract
This report provides an overview of the work and learning experiences gained during my
internship at Internpe, with a primary focus on Python programming. The internship was aimed
at enhancing my programming skills by engaging in real-world projects and tasks involving core
Python concepts, and practical application development.
The internship provided a valuable opportunity to bridge the gap between theoretical knowledge
and practical application, fostering my growth as a software developer.
(VII)
Acknowledgment
I would like to express my deepest gratitude to Internpe for providing me with the opportunity to
intern and gain hands-on experience in Python programming. This internship has been an enriching
learning experience, and I am truly grateful for the support and guidance extended by the team at Internpe.
I extend my heartfelt thanks to my mentor for their constant encouragement, constructive feedback,
and technical expertise throughout the internship. Their guidance helped me overcome challenges and achieve
my learning goals.
I would also like to thank my academic institution and my professors for their support in facilitating
this internship. Lastly, I am grateful to my family and friends for their encouragement and motivation
during this journey.
(VIII)
INDEX
Declaration (I)
Certificate (IV)
Abstract (VII)
Acknowledgment (VIII)
Introduction 1-2
• Context
• Motivation
• Motto of Organization
• Other Domain
• Development environment
• Application of Python
• Internship Description 8
TASK 1 9-11
TASK 2 12-13
TASK 3 14-17
Snake Game
TASK 4 18-19
Connect 4 game
• Conclusion 23
• References 24
Introduction
As a full time, student at University of Lucknow the degree towards I am currently studying
is a Bachelor of Computer Applications. The course was quite challenging for me for a few
reasons Firstly, the programming languages and development tools I was using were new
for me, hence I had to quickly integrate not only with my new living environment but also
academically. This was very beneficial for me as at the end I could compare what I have
learnt with what I already knew and find a connection between the two. Since I find myself
more interested in Python, I was happy to be assigned the position of a trainee in Python
with the help of a company Internpe.
• Context:
Motivation:
motivation of learning python
Learning Python is a fantastic journey for many reasons. Here are some motivations to keep you
inspired:
Multi-Purpose Language: Python can be used for web development, data analysis,
artificial intelligence, scientific computing, and more.
Libraries and Frameworks: With extensive libraries like Pandas, NumPy, TensorFlow,
and Django, you can handle anything from data manipulation to building complex web
applications.
(1)
Community and Support
Large Community: Python has a massive, active community. Whether you're a beginner
or an expert, you'll find forums, tutorials, and documentation to guide you.
Open-Source: Being open-source, Python is continuously improved by contributions
from developers around the world.
Ease of Learning
Readable Syntax: Python's syntax is clear and intuitive, making it an excellent language
for beginners.
Quick Prototyping: With Python, you can quickly prototype ideas, making it ideal for
startups and innovation.
Career Opportunities
High Demand: Python skills are highly sought after in the job market. From tech giants
to startups, many companies are looking for Python developers.
Diverse Roles: With Python, you can work in various fields like web development, data
science, machine learning, and more.
Future-Proof
(2)
About Organization
(3)
• Motto of Organization
Internpe believes in bridging the gap between students and their knowledge in the industrial
field & bringing them a step closer to their Dream. Internpe organization which claims to
spread knowledge in very efficient way.
• Other Domain
They focus on industrial training and offer Internship Programs where you can learn the
in-demand professional skills to advance your career in AI, ML, Data Science, Digital
Marketing, Python, Java, SQL & more.
(4)
Technology Description
• Technology requirement
Software requirement
• Operating System
• Web Browser
• Web Server
Hardware requirement
Minimum requirement:
Python is a high-level, interpreted programming language known for its simplicity and
versatility. Here is an in-depth look at Python and its technology:
(5)
Key Features of Python
1. Easy to Read and Write: Python has a clean and easy-to-understand syntax, making it
beginner-friendly. Its readability promotes better collaboration and reduces the cost of
program maintenance.
2. Interpreted Language: Python code is executed line by line, which makes debugging
easier and accelerates the development process.
3. Dynamically Typed: In Python, you don't need to declare the type of variable explicitly.
The type is determined at runtime, which makes coding faster but requires careful
handling of variables.
4. High-Level Language: Python abstracts away most of the complex details of the
computer’s hardware. This allows programmers to focus on solving problems rather than
managing memory and other low-level details.
1. Standard Library: Python comes with a rich standard library that includes modules and
packages for everything from handling file I/O to web development and data
manipulation.
2. Third-Party Libraries: There are thousands of third-party libraries available for Python,
such as:
(6)
NumPy: For numerical computations.
TensorFlow and PyTorch: For machine learning and deep learning applications.
Python Interpreter
Development Environments
Applications of Python
1. Web Development: Using frameworks like Django and Flask to build robust, scalable
web applications.
2. Data Science: Python is a leading language for data analysis, visualization, and machine
learning.
3. Automation: Python scripts are used to automate repetitive tasks.
4. Software Development: Python is used for developing both desktop applications and
games.
5. Artificial Intelligence and Machine Learning: Python’s libraries and frameworks
provide powerful tools for building AI and ML models.
6. Python's simplicity and flexibility make it an excellent choice for both beginners and
experienced developers, enabling them to build applications quickly and efficiently
across a variety of domains. If you have any specific area you want to delve deeper into,
let me know!
(7)
Internship Description
TASK 1 -
TASK 2 -
Create a TIC TAC TOE GAME with the help of Python Programming
TASK 3 -
TASK 4 –
CONNECT 4 GAME with the help of Python Programming
(8)
TASK 1
OBJECTIVE:
Time Retrieval: Obtain the current time from the system clock. Display Format: Format the time
into a readable digital clock format (e.g., HH:MM: SS). Update: Continuously update the
displayto reflect real-time changes. User Interaction (Optional): Allow users to interact, such as
setting alarms or toggling between 12-hour and 24-hour formats
HOW TO PERFORM:
1. Import Time Module: - Use the `time` module in Python to work with time-related functions.
2. Retrieve Current Time: - Utilize the `time` module to get the current time from the
systemclock.
3. Format Time: - Format the retrieved time into a readable digital clock format (hours,
minutes,seconds).
4. Display Time: - Display the formatted time continuously to create a real-time updating
digitalclock.
5. Optional: User Interaction: - Consider adding user interaction features, such as setting
alarms,adjusting time formats, or providing additional functionalities.
6. Run Indefinitely: - Use a loop to run the clock continuously, updating the display in real-time.
(9)
7. Error Handling: - Implement error handling to manage unexpected issues, ensuring the
clockoperates smoothly.
8. Optional: GUI Implementation (Tkinter): - If desired, explore using the Tkinter library
tocreate a graphical user interface for the digital clock
10. Testing: - Test the digital clock under different scenarios to ensure accuracy and reliability.
(10)
TASK 2
OBJECTIVE:
1.1 Player Interaction: Allow two players to take turns marking spaces on a 3x3 grid.
2. 2. Winning Condition: Define conditions for a player to win by having three marks in a row,
column, or diagonal.
3. 3. Tie Detection: Identify when the game results in a tie with no empty spaces left.
4. 4. User Experience: Ensure a user-friendly experience with clear instructions, valid move
validation, and an option to replay.
HOW TO PERFORM:
Certainly! Here is a non-code, step-by-step guide on how to create a basic Tic Tac Toe game
inPython:
1. Game Board Setup: - Create a 3x3 grid to represent the game board.
(11)
2. Player Turns: - Allow two players to take turns marking empty spaces on the grid.
4. Tie Detection: - Implement logic to detect a tie when there are no empty spaces left on
theboard.
5. User Interaction: - Enable user interaction by allowing players to input their moves.
6. Feedback: - Provide clear feedback after each move, indicating if a player has won, the game
isa tie, or if it is the next player's turn.
7. Reset and Replay: - Include functionality to reset the game board for a new match. -
Allowplayers to replay without needing to restart the program.
8. Validation: - Validate moves to ensure players can only mark empty spaces and avoid
illegalmoves.
10. Testing and Debugging: - Test the game thoroughly, including edge cases like invalid
inputs,and debug any issues to ensure smooth gameplay.
. 11. Optional Features (if time allows): - Explore additional features like a
scoreboard,customizable player marks, or a graphical user interface.
(12)
(13)
TASK 3
2. Food Interaction: Implement the appearance of food for the snake to consume and grow.
3. Collision Detection: Detect collisions between the snake and the game boundaries or itself.
4. Scorekeeping: Keep track of the player's score based on the number of food items consumed.
HOW TO PERFORM:
Certainly! Here is a non-code, step-by-step guide on how to create a basic Snake Game in Python:
1. Grid Setup: - Design a grid-based environment where the snake will move.
2. Player Control: - Allow the player to control the snake's movement using arrow keys or
asimilar input method.
3. Snake Movement: - Implement logic for the snake to move continuously in the
directionset by the player.
4. Food Generation: - Introduce food items randomly on the grid for the snake to
consumeand grow.
(14)
5. Collision Detection: - Detect collisions between the snake and the game boundaries or itself.
-Implement game-over conditions when a collision occurs.
6. Snake Growth: - Define the rules for the snake to grow longer after consuming food.
7. Scorekeeping: - Keep track of the player's score based on the number of food items consumed.
8. Game Loop: - Create a game loop that continually updates the game state, handles user
input,and redraws the screen.
11. User Interface Enhancements: - Include visual feedback for important events, such as
snakegrowth or game over.
12. Testing and Debugging: - Test the game thoroughly to ensure smooth gameplay and
addressany bugs or issues.
(15)
(16)
TASK 4
OBJECTIVE:
1. Grid Structure: Create a 6x7 grid to represent the Connect 4 game board.
2. Player Interaction: Allow two players to take turns dropping colored discs into columns.
3. Winning Condition: Define conditions for a player to win by connecting four discs
horizontally, vertically, or diagonally.
4. User Experience: Ensure a user-friendly experience with clear instructions, valid move
validation, and an option to replay.
HOWTOPERFORM:
Certainly! Here is a non-code, step-by-step guide on how to create a basic Connect 4 game
inPython:
1. Grid Setup: - Create a 6x7 grid to represent the Connect 4 game board.
2. Player Turns: - Allow two players to take turns dropping colored discs into columns.
3. Disc Placement: - Enable user interaction by allowing players to drop their discs into columns.
-Implement logic to place the disc in the lowest available position within the selected column.
(17)
4. Winning Conditions: - Define winning conditions by checking for four consecutive discs in
arow, column, or diagonal. - Implement logic to detect and announce a winner.
5. Tie Detection: - Implement logic to detect a tie when the grid is full with no Connect 4.
6. User Interface: - Provide clear feedback after each move, indicating the current player,
theoutcome of the move, and game status.
7. Reset and Replay: - Include functionality to reset the game board for a new match. -
Allowplayers to replay without needing to restart the program.
8. Validation: - Validate moves to ensure players can only drop discs in valid columns and
avoidillegal moves.
10. Testing and Debugging: - Test the game thoroughly, including edge cases like invalid
inputs,and debug any issues to ensure smooth gameplay.
(18)
(19)
Future Scope
The future of Python programming looks extremely bright, with numerous opportunities in
various fields. Here are some key areas where Python is expected to have a significant impact:
Data Analysis: Python's simplicity and robust libraries like Pandas and NumPy make it a
go-to choice for data analysis and manipulation.
Machine Learning: With powerful libraries such as TensorFlow, Keras, and Scikit-
learn, Python is extensively used in machine learning projects.
Artificial Intelligence: Python's versatility is ideal for developing AI applications,
including natural language processing, computer vision, and robotics.
2. Web Development
Frameworks: Popular frameworks like Django and Flask enable rapid web application
development. They are highly scalable and secure, making them suitable for both small
and large-scale projects.
Backend Development: Python's ease of integration with other languages and tools
makes it a strong choice for backend development.
Task Automation: Python's simple syntax makes it perfect for automating repetitive
tasks, from simple scripts to complex automated workflows.
DevOps: Python is widely used in DevOps for scripting, configuration management, and
continuous integration/continuous deployment (CI/CD) pipelines.
(20)
Research and Development: Python is heavily used in academia and scientific research
for simulations, data analysis, and prototyping.
Libraries: Libraries like SciPy and SymPy provide tools for scientific and numeric
computing, making Python a preferred language for researchers.
5. Game Development
Game Engines: Libraries like Pygame and Panda3D allow developers to create 2D and
3D games. Python's simplicity helps in rapid prototyping and game development.
6. Cybersecurity
Security Tools: Python is used to develop security tools and scripts for penetration
testing and network scanning.
Scripting: It is also used for writing exploits, analyzing malware, and
automatingcybersecurity tasks.
Financial Analysis: Python is used for financial modeling, algorithmic trading, and risk
management due to its powerful data processing capabilities.
Blockchain Development: Python's simplicity and reliability make it a good fit for
developing blockchain applications.
(21)
10. Cloud Computing
Cloud Services: Python is integrated with many cloud platforms, making it easier to
develop and deploy cloud-based applications.
Career Prospects
High Demand: With Python's wide-ranging applications, the demand for Python
developers continues to grow across various industries.
Competitive Salaries: Python developers often enjoy competitive salaries due to their
skills being in high demand.
By learning Python, you are equipping yourself with a valuable and versatile skill set that
opensdoors to numerous career opportunities in a variety of fields. Keep exploring and
building on your knowledge, and you will find yourself well-prepared for the future!
(22)
CONCLUSION
A key project I contributed to involved CONNECT 4 GAMES. This project allowed me to apply
Python's capabilities to solve real-world problems, reinforcing my knowledge of algorithms, data
structures, and best practices in software engineering. Additionally, I gained hands-on experience
with version control systems like Git and collaborative tools like JIRA.
The supportive and collaborative environment at INTERNPE enabled me to work closely with
experienced professionals, participate in code reviews, and receive constructive feedback. This
experience significantly improved my problem-solving abilities, debugging skills, and
understanding of the development lifecycle.
Overall, this internship has been a crucial step in my career development. It has equipped me
with the technical skills and confidence to tackle complex programming challenges and
contribute effectively to any development team. I am grateful for the mentorship and support
provided by my colleagues at INTERNPE and look forward to applying the knowledge and
experience I have gained in my future endeavours.
(23)
References
• www.internpe.in
• www.youtube.com
• www.tutorialspoints.com
• www.w3schools.com
• www.geeksforgeeks.org
(24)