Answer to Question #328505 in Python for nanan

Question #328505

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.

1
Expert's answer
2022-04-14T06:16:44-0400

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))


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS