質問編集履歴

2

ちょっとかえた

2019/04/18 13:36

投稿

lastcoat
lastcoat

スコア12

test CHANGED
File without changes
test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  with open("file.csv", "a") as f:
12
12
 
13
- while True:
13
+ while True:
14
14
 
15
15
  f.write("hello\n")
16
16
 
@@ -28,11 +28,11 @@
28
28
 
29
29
  while True:
30
30
 
31
- with open("file.csv", "a") as f:
31
+ with open("file.csv", "a") as f:
32
32
 
33
- f.write("hello\n")
33
+ f.write("hello\n")
34
34
 
35
- time.sleep(3)
35
+ time.sleep(3)
36
36
 
37
37
  ```
38
38
 

1

インデント

2019/04/18 13:36

投稿

lastcoat
lastcoat

スコア12

test CHANGED
File without changes
test CHANGED
@@ -3,6 +3,8 @@
3
3
 
4
4
 
5
5
  ・書いたコード
6
+
7
+ ```python
6
8
 
7
9
  import time
8
10
 
@@ -14,13 +16,15 @@
14
16
 
15
17
  time.sleep(3)
16
18
 
19
+ ```
20
+
17
21
 
18
22
 
19
23
  任意のタイミングでプログラムを停止してもfile.csvには何もかきこまれていませんでした。
20
24
 
21
25
 
22
26
 
23
- import time
27
+ ```python
24
28
 
25
29
  while True:
26
30
 
@@ -30,6 +34,14 @@
30
34
 
31
35
  time.sleep(3)
32
36
 
37
+ ```
38
+
33
39
 
34
40
 
35
41
  として書き込む度にopenしないといけないのでしょうか
42
+
43
+
44
+
45
+ osはwindows10
46
+
47
+ pycharmで実行・停止しています