-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFunction.py
73 lines (38 loc) · 762 Bytes
/
Function.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
# coding: utf-8
# ### Basic operations with Numbers and their reversed forms
# In[1]:
import numpy as np
import matplotlib.pyplot as plt
# In[2]:
a = np.arange(-100,101,1)
# In[3]:
b = np.arange(-100,101,1)
for i in range(0,201):
sum = int(0)
while(b[i]!=0):
sum = sum*10 +int(b[i]%10)
b[i] = int(b[i]/10)
b[i] = sum
# In[4]:
for i in range(0,101):
b[100-i] = (-1)*b[100+i]
# In[5]:
print(a,b,sep="\n\n")
# In[6]:
plt.plot(a,a-b)
plt.xlabel("X-Axis")
plt.ylabel("Y-Axis")
plt.title("Fn")
plt.show()
# In[7]:
plt.plot(a,b-a)
plt.xlabel("X-Axis")
plt.ylabel("Y-Axis")
plt.title("Fn")
plt.show()
# In[8]:
plt.plot(a,a+b)
plt.xlabel("X-Axis")
plt.ylabel("Y-Axis")
plt.title("Fn")
plt.show()