TECHNO COLLEGE OF ENGINEERING AGARTALA
A Diploma & Degree Engineering College, Affiliated to Tripura University, Approved By AICTE, MHRD Govt Of India.
Maheshkhola, Agartala West Tripura-799004
4 Week Of Summer Internship On The Topic Of “Python Programming” At
Tool Room & Training Centre , Guwahati , Ministry Of MSME ,Govt, Of India
By
Krishan Deep Debnath
Tu Roll ; 226701097
Reg ; 108993 Of 2022
[Link] 7th Sem Year 2025-26
Dept. Of Mechanical Engineering
Introduction to
Python
Programming
Welcome to Python! Dive into the fundamentals
of one of today's most popular and versatile
programming languages.
What is Python?
Python is a high-level, interpreted language created by
Guido van Rossum in 1989. Known for readable syntax and
versatility across web, data science, and automation.
Why Choose Python?
Readable Syntax Vast Ecosystem
Python's simple and clean syntax makes it easy It offers a huge standard library and a vibrant
to learn and write efficient code. ecosystem of third-party packages.
Multi-Paradigm Industry Adoption
Python supports multiple programming Tech giants like Google and Netflix use Python
paradigms, offering flexibility in problem-solving for diverse applications, proving its robustness.
approaches.
Uses of Python
Web Development Data Science & ML Automation & Scripting
Powers dynamic websites and web Essential for data analysis, Automates repetitive tasks,
applications with frameworks like visualization, and machine system administration, and
Django and Flask. learning with powerful libraries. creates utility scripts for efficiency.
Scientific Computing Game & GUI Apps
Used in scientific research, Develops games with Pygame and
numerical simulations, and creates desktop GUI applications
engineering with powerful with PyQt or Tkinter.
libraries.
Data Types and Variables
Python categorizes values into various **data types**.
Key types include:
• int: Whole numbers (e.g., 10, -5)
• float: Decimal numbers (e.g., 3.14, 2.0)
• str: Text or strings (e.g., "Hello", 'Python')
• bool: Boolean values (e.g., True, False)
Example:
age = 30
height = 1.75
name = "Alice"
is_student = True
Operators
Operators are special symbols that perform operations on values and variables.
Arithmetic Operators Comparison Operators
Perform mathematical calculations (e.g., +, -, *, /, %, **). Compare two values (e.g., ==, !=, <, >, <=, >=).
result = 10 + 5 # 15 is_equal = (5 == 5) # True
Logical Operators Assignment Operators
Combine conditional statements (e.g., and, or, not). Assign values to variables (e.g., =, +=, -=, *=).
valid = (True and False) # False x += 5 # x is now 15
If-Else Conditional Statements
if statement
Executes if its condition is True.
elif statement
Checks another condition if previous were Fa
else statement
Executes if all preceding conditions are False
Loops
Loops repeatedly execute code, ideal for iteration or specific actions.
for Loop while Loop
Iterates over a sequence or Repeats code as long as a
iterable objects, executing code specified condition remains
for each item. True.
break Statement
continue Statement
Terminates the loop entirely,
Skips the current iteration of the
transferring control to the
loop and moves to the next.
statement after.
Code Example: GUESS THE PERSON
Let's practice Python concepts like user input, conditionals, and arithmetic with a simple calculator program.
# thinker type code Gave your answer by pressing (1/0) Yes(1) or No(0) . if f == 1:
Base on that answer i will try to guess . [Link]('lefted')
I hope you like it ? if g == 1:
allstrawhats = { ''') [Link]('dream')
"luffy" : a = int(input('is this char is before grandline ? -')) if h == 1:
['grandline','male','freaking','mark','dream','haki','eat','devil' b = int(input('is your char is male ? -')) [Link]('haki')
], c = int(input('is this char freaking every time ? -')) if i == 1:
"Zoro" : d = int(input('is this chan carry weapon ? -')) [Link]('non-human')
['grandline','male','weapon','mark','dream','haki','eat'], e = int(input('is your char have any identefication mark on if j == 1:
"Sanji" : ['grandline','male','lefted','dream'], body ? -')) [Link]('eat')
"Ussop" : f = int(input('is your char lefted the crew ? -')) if k == 1:
['grandline','male','freaking','weapon','lefted','dream','eat'], g = int(input('is your char have dream to fullfill ? -')) [Link]('devil')
"Nami" : ['grandline','weapon','mark','lefted','dream'], h = int(input('is your char use any haki ? -')) break
"Robin" : ['lefted','dream','devil'], i = int(input('is uour char is non-human ? -')) print ('I think you are guessing about ......')
"chopper" : ['male','freaking','mark','dream','non- j = int(input('is youe char love to eat something ? -')) for name,allstrawhats in [Link]():
human','eat','devil'], k = int(input('is youe char have devil fruit power ? -')) if Strawhat == allstrawhats:
'Franky' : ['male','weapon','mark','eat'], while True : print (name)
'Brook' : ['male','weapon','mark','eat','devil'], if a == 1: break
'Jimbay' : ['male','mark','haki','non-human'], [Link]('grandline')
'Vivi' : ['weapon','lefted'], if b == 1:
'Thousandsunny' : ['weapon','non-human'], [Link]('male')
'Goingmarry' : ['grandline','weapon','lefted','non-human'] if c == 1:
} [Link]('freaking')
Strawhat = [] if d == 1:
print (''' [Link]('weapon')
think about a strawhats if e == 1:
I will ask some question about your strawhats . [Link]('mark')
Conclusion
Python's simplicity, versatility, and powerful ecosystem make it an invaluable tool for developers across
various domains. It empowers you to bring your ideas to life.
Start Small
Begin with simple projects.
Keep Learning
Continuously explore new libraries and concepts.
Practice Regularly
Consistent coding practice is key.