Computer Science, asked by Anonymous, 1 month ago

Write a python program to print sum of two numbers.
Solve this task using Object Oriented programming technique ( OOPs).

Answers

Answered by Aryansingh001
5

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

Answered by Anonymous
1

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 :)

Attachments:
Similar questions