質問編集履歴

6

修正

2018/11/12 13:39

投稿

SoojunBarng
SoojunBarng

スコア10

test CHANGED
File without changes
test CHANGED
@@ -74,7 +74,7 @@
74
74
 
75
75
  return float(prompt_neutron_life_time)
76
76
 
77
- print("hello283")
77
+ print("hello24")
78
78
 
79
79
 
80
80
 

5

質問への答え

2018/11/12 13:39

投稿

SoojunBarng
SoojunBarng

スコア10

test CHANGED
File without changes
test CHANGED
@@ -40,7 +40,7 @@
40
40
 
41
41
  return float(K_infinite)
42
42
 
43
- print ("hello")
43
+ print ("hello13")
44
44
 
45
45
 
46
46
 
@@ -74,7 +74,7 @@
74
74
 
75
75
  return float(prompt_neutron_life_time)
76
76
 
77
- print("hello")
77
+ print("hello283")
78
78
 
79
79
 
80
80
 
@@ -220,6 +220,48 @@
220
220
 
221
221
 
222
222
 
223
+ でスクリプトを行った際に、
224
+
225
+ 元々の意図であれば、
226
+
227
+ hello13
228
+
229
+ hello24
230
+
231
+ hello13
232
+
233
+ hello24
234
+
235
+ hello13
236
+
237
+ ....
238
+
239
+ がでるべきなのに
240
+
241
+
242
+
243
+ hello13
244
+
245
+ hello13
246
+
247
+ hello13
248
+
249
+ hello13
250
+
251
+ hello13
252
+
253
+ hello13
254
+
255
+ hello13
256
+
257
+ でしかでません!
258
+
259
+
260
+
261
+
262
+
263
+
264
+
223
265
 
224
266
 
225
267
 

4

下に全体のコードも一応、載せました

2018/11/12 13:38

投稿

SoojunBarng
SoojunBarng

スコア10

test CHANGED
File without changes
test CHANGED
@@ -82,6 +82,150 @@
82
82
 
83
83
 
84
84
 
85
+ ```ここに言語を入力
86
+
87
+
88
+
89
+ t1 = 0
90
+
91
+ while (t1 < 11):
92
+
93
+ x = 0
94
+
95
+ y = 0
96
+
97
+ t2 = 0
98
+
99
+ while ( t2 < len(Actinide_number[t1]) ):
100
+
101
+ atomicnumber = Actinide_number[t1][t2]
102
+
103
+ nuclide = Actinide_Word[t1]
104
+
105
+ insert = Actinide[t1][0]
106
+
107
+ target = str(insert) + str(atomicnumber)
108
+
109
+
110
+
111
+ path = "D:/1111/"+str(nuclide)
112
+
113
+
114
+
115
+ try:
116
+
117
+ os.chdir(path)
118
+
119
+ except:
120
+
121
+ os.mkdir(path)
122
+
123
+ os.chdir(path)
124
+
125
+
126
+
127
+ # return to zero
128
+
129
+ K_infinite_list = []
130
+
131
+ prompt_neutron_list = []
132
+
133
+ fission_area_list = []
134
+
135
+ assorbtion_area_list = []
136
+
137
+ nu_bar_list = []
138
+
139
+
140
+
141
+ t3 = 0
142
+
143
+ while (t3 < 9 ):
144
+
145
+ dillution = 10 ** (t3-3)
146
+
147
+ t4 = 0
148
+
149
+
150
+
151
+
152
+
153
+ while (t4 <9 ):
154
+
155
+ dillusion2 = t4+1
156
+
157
+ dil = dillution * dillusion2
158
+
159
+ solution = "H2O"
160
+
161
+ H_nuclide = dil
162
+
163
+ H_nuclide2 = dil / dillution
164
+
165
+ solution_H_number = 2
166
+
167
+ H_U = 200 / H_nuclide
168
+
169
+ s = int(H_nuclide2)
170
+
171
+
172
+
173
+ sub1()
174
+
175
+
176
+
177
+ sub2()
178
+
179
+
180
+
181
+ sub4()
182
+
183
+
184
+
185
+ sub5()
186
+
187
+
188
+
189
+ sub6()
190
+
191
+
192
+
193
+ integrate1()
194
+
195
+
196
+
197
+ integrate2()
198
+
199
+
200
+
201
+ t4 += 1
202
+
203
+ t3 += 1
204
+
205
+
206
+
207
+ excel()
208
+
209
+
210
+
211
+ t2 += 1
212
+
213
+ t1 += 1
214
+
215
+
216
+
217
+
218
+
219
+ ```
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
85
229
  是非とも、助けて下さい!
86
230
 
87
231
  お願い致します。

3

コード

2018/11/12 13:28

投稿

SoojunBarng
SoojunBarng

スコア10

test CHANGED
File without changes
test CHANGED
@@ -16,11 +16,7 @@
16
16
 
17
17
  ・errorを返してくれないので、更に難しいです
18
18
 
19
-
20
-
21
19
  ```ここに言語を入力
22
-
23
-
24
20
 
25
21
  def sub1():
26
22
 
@@ -82,11 +78,7 @@
82
78
 
83
79
 
84
80
 
85
-
86
-
87
-
88
-
89
- ``
81
+ ```
90
82
 
91
83
 
92
84
 

2

変更

2018/11/12 13:25

投稿

SoojunBarng
SoojunBarng

スコア10

test CHANGED
File without changes
test CHANGED
@@ -20,6 +20,8 @@
20
20
 
21
21
  ```ここに言語を入力
22
22
 
23
+
24
+
23
25
  def sub1():
24
26
 
25
27
  pattern = re.compile("plot of the estimated col/abs/track-length keff one standard deviation interval")
@@ -38,11 +40,15 @@
38
40
 
39
41
  #print (linenum)
40
42
 
41
- print (K_infinite)
43
+ #print (K_infinite)
42
44
 
43
45
  return float(K_infinite)
44
46
 
45
- print ("hello")
47
+ print ("hello")
48
+
49
+
50
+
51
+
46
52
 
47
53
  def sub2():
48
54
 
@@ -56,19 +62,23 @@
56
62
 
57
63
  prompt_neutron_line = str(line)
58
64
 
59
- prompt_nuetron_life_time_frontnumber = prompt_nuetron_life_time_line[62:67]
65
+ prompt_neutron_life_time_frontnumber = prompt_neutron_life_time_line[62:67]
60
66
 
61
- prompt_nuetron_life_time_over = prompt_nuetron_life_time_line[69:71]
67
+ prompt_neutron_life_time_over = prompt_neutron_life_time_line[69:71]
62
68
 
63
- prompt_nuetron_life_time = prompt_nuetron_life_time_frontnumber * (10 ** prompt_nuetron_life_time_over)
69
+ prompt_neutron_life_time = prompt_neutron_life_time_frontnumber * (10 ** prompt_neutron_life_time_over)
64
70
 
65
71
  #print (line)
66
72
 
67
73
  #print (linenum)
68
74
 
69
- print ("problem")
75
+ print (line)
70
76
 
77
+ print (prompt_neutron_line)
78
+
71
- return float(prompt_nuetron_life_time)
79
+ return float(prompt_neutron_life_time)
80
+
81
+ print("hello")
72
82
 
73
83
 
74
84
 

1

コードで区分を付けました

2018/11/12 13:24

投稿

SoojunBarng
SoojunBarng

スコア10

test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,7 @@
1
+ 総じて、テキストの中で、patternにマッチングする行を探し、それから得た値をずっと加工するようなプログラミングを書きたいと考えます。
2
+
3
+
4
+
1
5
  やりたい事
2
6
 
3
7
  ・sub1()でK_infiniteをreturnしてもらい、K_infiniteを求める事
@@ -10,9 +14,11 @@
10
14
 
11
15
  ・sub1()の実行後に、sub2()は実効されません。
12
16
 
17
+ ・errorを返してくれないので、更に難しいです
13
18
 
14
19
 
15
20
 
21
+ ```ここに言語を入力
16
22
 
17
23
  def sub1():
18
24
 
@@ -68,6 +74,12 @@
68
74
 
69
75
 
70
76
 
77
+
78
+
79
+ ``
80
+
81
+
82
+
71
83
  是非とも、助けて下さい!
72
84
 
73
85
  お願い致します。