Error in inheritance


pls tell me whats the error going on

Instead of n01 and no2 in line 13 convert it to input1 and input2


still showing an error

input1 and input2 both are class. are we supposed to add class?

@nithinsnty1998

That is not the correct way to define class

ok then can you pls suggest me the way to define class as i followed how it was taught in the session.

1 Like

@nithinsnty1998
Syntax for class declaration:
class :


.
.

Example:

class student:
Statements

Here you can make changes as u declared class input1 and class input2 in addition class you inherited it so in sum function you can simply take 2 arguments and them sum it up.

1 Like