# Python | Input two integers and find their addition

Here, we are implementing **two number addition program in Python**, we will **read two integer values from the user and print their addition/sum**.

Submitted by Pankaj Singh, on September 28, 2018

**Input two integer numbers from the user and find their sum/addition in Python.**

**Example:**

Input: Enter A: 100 Enter B: 200 Output: Sum: 300

**Program:**

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

**Output**

Enter A: 100 Enter B: 200 Sum: 300

**Explanation:**

Here, we are reading two values and assigning them in variable a and b - to input the value, we are using input() function, by passing the message to display to the user. Method input() returns a string value, and we are converting the input string value to the integer by using int() method.

After that, we are calculating the sum of a and b and assigning it to the variable c. And then, printing the value of c which is the sum of two input integers.

TOP Interview Coding Problems/Challenges

- Run-length encoding (find/print frequency of letters in a string)
- Sort an array of 0's, 1's and 2's in linear time complexity
- Checking Anagrams (check whether two string is anagrams or not)
- Relative sorting algorithm
- Finding subarray with given sum
- Find the level in a binary tree with given sum K
- Check whether a Binary Tree is BST (Binary Search Tree) or not
- 1[0]1 Pattern Count
- Capitalize first and last letter of each word in a line
- Print vertical sum of a binary tree
- Print Boundary Sum of a Binary Tree
- Reverse a single linked list
- Greedy Strategy to solve major algorithm problems
- Job sequencing problem
- Root to leaf Path Sum
- Exit Point in a Matrix
- Find length of loop in a linked list
- Toppers of Class
- Print All Nodes that don't have Sibling
- Transform to Sum Tree
- Shortest Source to Destination Path

Comments and Discussions

**Ad:**
Are you a blogger? Join our Blogging forum.