-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNumbers1.py
More file actions
35 lines (22 loc) · 783 Bytes
/
Numbers1.py
File metadata and controls
35 lines (22 loc) · 783 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
class Numbers:
def __init__(self):
self.Size = list()
self.Arr = list()
def Accept(self):
print("Enter how many elements you want: ")
self.Size = int(input())
print("Please enter the elements")
value = 0
for i in range(0,self.Size):
value = int(input())
self.Arr.append(value)
def Display(self):
print("Elements from list are: ")
for i in range(0,self.Size):
print(self.Arr[i])
def main():
obj = Numbers()
obj.Accept()
obj.Display()
if __name__ == "__main__":
main()