See video - Go to video
Code :
#variable
x = 7
y = 5
z = 9
print(x+y+z)
#assign multiple variable
x,y,z = "hello","phpecho","please like"
print(x,y,z)
x,y,z = 3,5.9,9.1
print(x+y+z)
#variable swaping program
p = 9
q = 8
result = str(p)+str(q) #str show value as a text
print("The number was",result)
d = p # d is the temporary varibale
p = q
q = d
result = str(p)+str(q)
print("The reverse of number is", result)
No comments:
Post a Comment