-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLesBases.py
More file actions
47 lines (36 loc) · 688 Bytes
/
LesBases.py
File metadata and controls
47 lines (36 loc) · 688 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
functions = []
for i in range(5):
def func(x):
return x + i
functions.append(func)
for f in functions:
print(f(12))
print(i)
print()
x1 = [1, 2, 3, 4, 5]
print("X : ", x1)
x1.insert(1, 8)
print("Insert : ", x1)
x1.append(8)
print("Append : ", x1)
x1.extend([6, 7])
print("Extend : ", x1)
x1.append([8, 9])
print("Append list : ", x1)
x1.pop(9)
print("Pop : ", x1)
x1.remove(8)
print("Remove : ", x1)
print()
def quad_eval(a, b, c, v):
"""
:param a:
:param b:
:param c:
:param v:
:return:
"""
term1 = a * v ** 2
term2 = b * v
return term1 + term2 + c
print(quad_eval(7, 8, 9, 3))