-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram33.py
More file actions
49 lines (31 loc) · 746 Bytes
/
program33.py
File metadata and controls
49 lines (31 loc) · 746 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
41
42
43
44
45
46
47
48
49
#xxargs and xxxargs------------
#xxargs-----------
def student(id,name,gpa):
print(id,name,gpa)
student(101,"Arif",4.50)
def student(*details):
print(details[3])
student(101,"Arif",4.50,25)
student(102,"Tamim",4.60,24)
def add(*details):
sum = 0
for num in details:
sum = num + num
print(sum)
add(10,20)
add(10,20,30)
add(10,20,40,50)
def sub(*details):
sum = 0
for num in details:
sum = sum + num
return (sum)
s = sub(300,200)
print(s)
#xxxargs-----------
def student(**details):
print(details)
student(id=101,name="Arif",gpa=4.50)
def teacher(**details):
print(details)
teacher(id="1010",name="Rofiq",subject="Math")