Variable is used to store the data. In other words variable is a name of memory location. Equal (=) is used to assign a value to a variable.
Program:
a=10
b=3.2
c='A'
s="GPR Computers"
print(a)
print(b)
print(c)
print(s)
10
3.2
A
GPR Computers
Program: Using single print()
function
a=10
b=3.2
c='A'
s="GPR Computers"
print(a,'\n',b,'\n',c,'\n',s)
Output:
10
3.2
A
GPR Computers
Comments
Post a Comment