Wednesday, 3 July 2019

Example programs on variables

#Ex1.py
x=5
y="Rajendra"
print(x)
print(y)

"""output:
5
Rajendra """


#Ex2.py
"""This programs explains the variable
concept"""
a,b,c="vij","hyd","blore"
print(a)
print(b)
print(c)

ouput
vij
hyd
blore


"""Ex4.py"""
a = b = c = "rajendra"

print(a)
print(b)
print(c)

output:
rajendra
rajendra
rajendra

No comments:

Post a Comment

Files with Exception handling

#Ask the user to take two input integer values var a,b try:     a=int(input("enter any integer value:"))     b=int(input(...