Answer to Question #295504 in Python for Suresh

Question #295504

Date format-2 expalin code sum getting error

1
Expert's answer
2022-02-09T05:55:25-0500

python program for adding user inputs

# Store input numbers
num1 = input('Enter first number: ')
num2 = input('Enter second number: ')


# Add two numbers
sum = float(num1) + float(num2)


# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))


how to add in python

a = int(input())
b = int(input())
s = a+b
print(S)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS