-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path128 prog 2.py
More file actions
40 lines (34 loc) · 814 Bytes
/
128 prog 2.py
File metadata and controls
40 lines (34 loc) · 814 Bytes
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
class student:
list1=[]
list2=[]
list3=[]
average=0
sum1=0
for i in range(0,2):
print("roll number")
__x=int(input())
list1.append(__x)
print("name")
__y=input()
list2.append(__y)
print("marks")
__z=int(input())
list3.append(__z)
print("details of student")
print("roll numbers :")
for j in list1:
print(j)
print("names :")
for j in list2:
print(j)
print("marks :")
for j in list3:
print(j)
sum1=sum(list3)
def display(self):
print("sum is :",self.sum1)
def average_class(self):
print("average is :",self.sum1/2)
obj1=student()
obj1.display()
obj1.average_class()