Source Code
#In this program x and y are string.
x='18'
y='2.9'
#here we convert string to int
print("Type of x is :", type(x))
X1=int(x)
print("New Type of x is :", type(X1))
#here we convert string to int
print("Type of x is :", type(y))
Y1=float(y)
print("New Type of x is :", type(Y1))
No comments:
Post a Comment