Python Programming - Adding Two Numbers - Updated 2021

Опубликовано: 23 Октябрь 2024
на канале: WeMakeItEasy
6,590
41

Make it Easy to Add Two Numbers using Python Programming ..

=Code=

NUM1 = input('Enter first number: ')
NUM2 = input('Enter second number: ')

sum = float(num1) + float(num2)

print('The sum of {0} and {1} is {2}'.format(NUM1, NUM2, sum))

=End Code=

In this program, we asked user to enter two numbers and the program displays the sum of two numbers entered by a user