Shivam is the youngest programmer in the world, he is just 12 years old. Shivam is learning programming and today he is writing his first program.
The task is very simple: given two integers A and B, write a program to add these two numbers and output it.
while True:
try:
A=int(input('Enter an integer A: '))
break
except:
print('You can only enter a integer.')
while True:
try:
B=int(input('Enter an integer B: '))
break
except:
print('You can only enter a integer.')
amount=A+B
print('The sum of the numbers A and B is {}'.format(amount))
Comments
Leave a comment