Here, we are actualizing two number addition program in Python, we will peruse two integers esteems from the client and print their addition/whole.
Input: Enter A: 100 Enter B: 200 Output: Sum: 300
# input two numbers: value of a and b a = int(input("Enter A: ")) b = int(input("Enter B: ")) # find sum of a and b and assign to c c = a+b # print sum (c) print("Sum: ",c)
Enter A: 100 Enter B: 200 Sum: 300
Information two integer numbers from the client and discover their whole/addition in Python.
Here, we are perusing two qualities and allocating them in factor an and b – to include the worth, we are utilizing input() work, bypassing the message to show to the client. Strategy input() restores a string worth, and we are changing over the information string an incentive to the integer by utilizing int() technique.
From that point onward, we are figuring the aggregate of an and b and relegating it to the variable c. And afterwards, printing the estimation of c which is the total of two info integers.