質問編集履歴

4

誤字

2023/03/18 01:03

投稿

tora_tora
tora_tora

スコア14

test CHANGED
File without changes
test CHANGED
@@ -43,7 +43,7 @@
43
43
 
44
44
 
45
45
  ```Python
46
- # count_.recursive_func_with_list.py
46
+ # count_recursive_func_with_list.py
47
47
  def test(counter):
48
48
  if len(counter) == 2:
49
49
  return
@@ -61,7 +61,7 @@
61
61
  ```
62
62
 
63
63
  ```Python
64
- # count_.recursive_func_with_int.py
64
+ # count_recursive_func_with_int.py
65
65
  def test(counter):
66
66
  if counter == 2:
67
67
  return

3

誤字、追記

2023/03/18 01:02

投稿

tora_tora
tora_tora

スコア14

test CHANGED
File without changes
test CHANGED
@@ -9,7 +9,7 @@
9
9
  ### 発生している問題・エラーメッセージ
10
10
 
11
11
  ```
12
- $ python count_.recursive_func_with_list.py
12
+ $ python count_recursive_func_with_list.py
13
13
  ----------------
14
14
  []
15
15
  [1]
@@ -20,7 +20,7 @@
20
20
  ----------------
21
21
  ```
22
22
  ```
23
- $ python count_.recursive_func_with_int.py
23
+ $ python count_recursive_func_with_int.py
24
24
  ----------------
25
25
  0
26
26
  1
@@ -79,8 +79,7 @@
79
79
  ```
80
80
 
81
81
  ### 試したこと
82
-
83
- 記の通りです
82
+ counter限を2以外に試しても同じく差が生じました
84
83
 
85
84
  ### 補足情報(FW/ツールのバージョンなど)
86
85
 

2

コード記載の誤り

2023/03/18 00:59

投稿

tora_tora
tora_tora

スコア14

test CHANGED
File without changes
test CHANGED
@@ -45,11 +45,11 @@
45
45
  ```Python
46
46
  # count_.recursive_func_with_list.py
47
47
  def test(counter):
48
- if counter == 2:
48
+ if len(counter) == 2:
49
49
  return
50
50
  print("----------------")
51
51
  print(counter)
52
- counter += 1
52
+ counter.append(1)
53
53
  print(counter)
54
54
  print("----------------")
55
55
  test(counter)

1

コードの記載の不足

2023/03/18 00:57

投稿

tora_tora
tora_tora

スコア14

test CHANGED
File without changes
test CHANGED
@@ -73,6 +73,9 @@
73
73
  test(counter)
74
74
  test(counter)
75
75
  test(counter)
76
+
77
+ counter = 0
78
+ test(counter)
76
79
  ```
77
80
 
78
81
  ### 試したこと