Write a python program to print sum of two numbers. Solve this task using Object Oriented programming technique ( OOPs). About the author Charlotte
Your Object Oriented program is in attachment, output is also attached. In order to solve this problem you should have a basic knowledge of functions, class, object and f strings. This problem can also be solved using other methods. A = int(input(“Enter first number:”)) B = int(input (“Enter second number:”)) print (A+B) This program would be easy for you to find sum of two numbers. This is good to learn object oriented programming. Good Luck 🙂 Reply
Answer: x = 1 y= 1 print(x+y) input meathod x = (input()) y = input() print(x+y) Explanation: hope it is correct coz, i hve not practiced python for more thank a year Reply
Your Object Oriented program is in attachment, output is also attached.
In order to solve this problem you should have a basic knowledge of functions, class, object and f strings.
This problem can also be solved using other methods.
A = int(input(“Enter first number:”))
B = int(input (“Enter second number:”))
print (A+B)
This program would be easy for you to find sum of two numbers.
This is good to learn object oriented programming.
Good Luck 🙂
Answer:
x = 1
y= 1
print(x+y)
input meathod
x = (input())
y = input()
print(x+y)
Explanation:
hope it is correct coz, i hve not practiced python for more thank a year