Given variables x=30 and y=20, write a Python program to print “30+20=50”.

Given variables x=30 and y=20, write a Python program to print “30+20=50”.

1
2
3
4
x = 30
y = 20
print("\n%d+%d=%d" % (x, y, x+y))
print()

Final output

Leave a Comment