Python
write the program for following output
Enter the number 1:10
Enter the number 2:20
Total 30
Pls. Answer fast
Answers
Answered by
2
Solution.
Here comes the approach for the problem using Python.
a=int(input('Enter the number 1: '))
b=int(input('Enter the number 2: '))
print('Total',a+b)
Or simply,
print('Total',int(input('Enter the number 1: '))+int(input('Enter the number 2: ')))
Logic.
- Accepting numbers as input.
- Add the numbers entered.
- Display the sum.
See attachment for output.
Attachments:
Similar questions