Shraiysh Vaishay's Profile

About

 
Points: 11

Contact

 

Shraiysh Vaishay  >>  Bucky Roberts
August 19, 2017 · Public

a=input("Enter a=")
b = input( "Enter b=" )
if a.isdigit() and b.isdigit():
sum=a+b
else:
sum=0
print("Sum=",sum)

how does print get sum as it was first declared and initialized in the if block.
please help...

Shraiysh Vaishay
August 16, 2017 · Public

hi bucky
i wrote this code in python3
a=1234
def a():
a=2345
print(a)
def b():
print(a)

a()
b()

it displayed an error

please help...