質問編集履歴
3
かいぜん
test
CHANGED
File without changes
|
test
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
入力された値段から対応する品を検索するSearch関数
|
11
11
|
(引数:値段 返り値:対応する品データ(List))
|
12
|
-
※対応する品データ(List):引数で指定された
|
12
|
+
※対応する品データ(List):引数で指定された値段が含まれるリスト
|
13
13
|
※csvファイルなので「,」や「"」があることに注意すること
|
14
14
|
品データを元に,検索結果を表示するGoods関数
|
15
15
|
(引数:品データ(List) 返り値:なし)
|
2
かいぜん
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,9 @@
|
|
28
28
|
```python
|
29
29
|
path=Goods.CSV
|
30
30
|
def Search(price):
|
31
|
-
with open(path,"r") as f
|
31
|
+
with open(path,"r") as f:
|
32
|
+
for l in f:
|
33
|
+
print(l)
|
32
34
|
|
33
35
|
def Goods():
|
34
36
|
|
1
改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,6 +28,7 @@
|
|
28
28
|
```python
|
29
29
|
path=Goods.CSV
|
30
30
|
def Search(price):
|
31
|
+
with open(path,"r") as f
|
31
32
|
|
32
33
|
def Goods():
|
33
34
|
|