-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiple.py
More file actions
62 lines (47 loc) · 1.13 KB
/
multiple.py
File metadata and controls
62 lines (47 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 17 10:21:39 2019
@author: Patil
"""
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 17 10:01:38 2019
@author: Patil
"""
class student:
def __init__(self,fname):
self.name=fname
def show(self):
print("Name : ",self.name)
class marks:
def __init__(self,m1,m2):
self.sem1=int(m1)
self.sem2=int(m2)
self.total=0
def detail(self):
self.total=self.sem1+self.sem2
print("Total : ",self.total)
class output(student,marks):
def __init__(self,fname,m1,m2,year):
self.yr=year
student.__init__(self,fname)
marks.__init__(self,m1,m2)
def result(self):
self.show()
self.detail()
print("Year : ",self.yr)
a=input('Enter Name : ')
b=(input('Enter Marks 1 : '))
c=input('Enter Marks 2 : ')
d=input('Enter Year : ')
obj=output(a,b,c,d)
obj.result()
'''
Enter Name : Chaitanya
Enter Marks 1 : 700
Enter Marks 2 : 800
Enter Year : May 2018
Name : Chaitanya
Total : 1500
Year : May 2018
'''