-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
113 lines (70 loc) · 1.58 KB
/
main.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# radius = 4
# pi =3.14
# pi
# perimeter = 2*pi*radius
# print(perimeter)
# area=pi*(radius**2)
# print(area)
#conditonal statements
# age=float(input("Enter your age: "))
# if True:
# pass
# if 12<age<18:
# growth_stage="Teen"
# print("Growth Stage: " + growth_stage)
# elif 18<=age<21:
# print("You are : Young" )
# elif age>=21:
# print("You are an: Adult" )
# # else:
# # print("You are a: Child" )
# print(str(age) + " years old")
#loops
'''n=int(input("Enter a number: "))
i=1;
while i<=n:
print(i,end="")
if i!=n:
print(" ",end="")
i=i+1'''
#lists
'''a=["hi","hello",2,0,3,"harsha",["vardhan","Duvvuru",527]]
list=[1,2,3,4]
val =int(input())
print(val in list)'''
#n=int(input("Enter a value: "))
i=1;
'''while i<=n:
if(i%2!=0):
print("the Given odd numbers are :"+str(i))
i=i+1'''
'''def add(a,b,c):
return a+b+c
print(add(c=1,b=2,a=3))'''
# all keyword argunments must appear before keyword arguments
def greet(name="harsha",greeting="hello"):
print(greeting+" "+name)
#greet()
#greet("Developers",greeting="hi")
#greet("Developers")
#a=greet() # return None
#saving function in another variable
'''hello = greet
hello()
hello("Developers",greeting="hello")
hello("Developers")
a=hello()
print(a)'''
'''a=int(input())
b=int(input())
def add(a,b):
return a+b
def multiply(a,b):
return a*b
def operate(a,b,operation=add):
return operation(a,b)
print(operate(a,b))
print(operate(a,b,operation=multiply))'''
if __name__=="__main__":
import sys
print(sys.argv)