-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path7_func.py
62 lines (56 loc) · 1.33 KB
/
7_func.py
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
Python 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
def my_fun():
prrint("hello")
def my_fun():
prrint("hello")
def myfun():
print("hello fun")
myfun()
SyntaxError: invalid syntax
def myfun():
print("hello fun")
myfun()
hello fun
def myfun(fname):
... print(fname+"Rexyr")
...
...
>>> myfun("AStga")
AStgaRexyr
>>> def myfun(fname):
... print(fname+" Rexyr")
...
...
>>> myfun("lizzo")
lizzo Rexyr
>>> def myfun(fname, lname):
... print(fname +" "+ lname)
...
...
>>> myfun("Astha","Thapa")
Astha Thapa
>>> def fun(Mtname, Location):
... print(Mtname +" ,"+Location)
...
...
>>> fun("Mt.Annapurna","Sinwa")
Mt.Annapurna ,Sinwa
>>> def fun(Mtname, Location):
... print("I love"+" "+Mtname +" ,"+"It lies at"+Location)
...
...
>>> fun("Mt.Annapurna","Ghorepani")
I love Mt.Annapurna ,It lies atGhorepani
>>> def my_fun(*kids):
... print("The youngest child is" +kids[2])
...
...
>>> my_fun("Amin","Ashree","Aasmin")
The youngest child isAasmin
>>> def my_fun(*kids):
... print("The youngest child is " +kids[2])
...
...
>>> my_fun("Amin","Ashree","Aasmin")
The youngest child is Aasmin