In this program, we asked the user to enter two numbers and this program displays the sum of two numbers entered by user.
Source Code:
x = input("Num1: ")
y = input("Num2: ")
sum = int(x) + int(y)
print("the sum is: " , sum)
______________________________
sorry for bg noice
We use the built-in function input() to take the input. Since, input() returns a string, we convert the string into number using the float() function. Then, the numbers are added.
On this page of the site you can watch the video online How to Add Two Numbers with Python with a duration of hours minute second in good quality, which was uploaded by the user Cypherr 07 May 2021, share the link with friends and acquaintances, this video has already been watched 64 times on youtube and it was liked by 8 viewers. Enjoy your viewing!