Type Conversion
and Type Casting
Shani Tiwari -
2404030101039
11:11
PM
In Python
Devendrakumar Mali-
2404030101003
Mohit Rana -
2404030101011
Division- D
Faculty Name-
Jalpa Patel
30-07-2025
What is Type
Conversion?
x = 5 # int
y = 2.5 # float
z = x + y # float + int → float
print(z) # Output: 7.5
Back to Front Page
• Type conversion
means
converting a
value from one
data type to
another.
Back to Second Page
Python supports two types of
conversion
1.Implicit conversion: Python does
it automatically
2.Explicit conversion (type casting):
Done by the programmer
Common Type
Conversion
Functions
a = "10"
b = int(a)
print(b + 5) # Output: 15
String to Integer Float to Integer Integer to string
x = 5.9
y = int(x)
print(y) # Output: 5
num = 100
text = str(num)
print("Value is " + text) # Output:
Value is 100
Thank you!
With Our All Team Members!

Type Conversion in Python: Implicit and Explicit

  • 1.
    Type Conversion and TypeCasting Shani Tiwari - 2404030101039 11:11 PM In Python Devendrakumar Mali- 2404030101003 Mohit Rana - 2404030101011 Division- D Faculty Name- Jalpa Patel 30-07-2025
  • 2.
    What is Type Conversion? x= 5 # int y = 2.5 # float z = x + y # float + int → float print(z) # Output: 7.5 Back to Front Page • Type conversion means converting a value from one data type to another.
  • 3.
    Back to SecondPage Python supports two types of conversion 1.Implicit conversion: Python does it automatically 2.Explicit conversion (type casting): Done by the programmer
  • 4.
  • 5.
    a = "10" b= int(a) print(b + 5) # Output: 15 String to Integer Float to Integer Integer to string x = 5.9 y = int(x) print(y) # Output: 5 num = 100 text = str(num) print("Value is " + text) # Output: Value is 100
  • 6.
    Thank you! With OurAll Team Members!