Computer Science, asked by VishnuKumar96, 10 months ago

write a python code for adding two numbers? ​

Answers

Answered by king917385246
2

Answer:

num1 = input("Enter first number:")

num2 = input("Enter second number:")

sum = int(num1) + int(num2)

print("The Sum of {0} and {1} is :: {2}". format(num1, num2, sum))

 

Explanation:

num1 will ask 1st number from user

num2 will ask 2nd number from user

sum will add these two number

and at last it will show the result

try this

Answered by AskewTronics
0

Below are the python code and the output for the above question.

Output :

If the user input as 4 and 5, then the output is 9.

If the user input as 5 and 5, then the output is 10.

Explanation:

print("The addition of the number are: ",int(input("Enter the first number: "))+int(input("Enter the second number : ")))#take the two number from the user and print the addition result.

Code Explanation :

  • The above one-line code is written in the python language, which holds the three statements.
  • Two input statement which instructs the user to take the input and takes the input from the user.
  • Then the addition will be performed by the help of the addition operator and print the result with the help of print function.

Learn More ;

  • Python : https://brainly.in/question/14689905
Similar questions