質問編集履歴

4

Code修正

2018/09/30 05:56

投稿

rapid_aoba
rapid_aoba

スコア13

test CHANGED
File without changes
test CHANGED
@@ -42,7 +42,11 @@
42
42
 
43
43
  181ページのコードの最後(http://tinyurl.com/jz8zfz7)
44
44
 
45
+ 抜粋:
46
+
47
+ ```
48
+
45
- 抜粋:```def rm_card(self):
49
+   def rm_card(self):
46
50
 
47
51
  if len(self.cards)==0:
48
52
 
@@ -52,11 +56,13 @@
52
56
 
53
57
  ```
54
58
 
59
+
60
+
55
61
  183ページのコード本:27〜30行目、サイト33〜35行目(http://tinyurl.com/huwq8mw)
56
62
 
57
63
  ```
58
64
 
59
- def play_game(self):
65
+   def play_game(self):
60
66
 
61
67
  cards = self.deck.cards
62
68
 
@@ -84,6 +90,10 @@
84
90
 
85
91
  ```
86
92
 
93
+
94
+
95
+ ```
96
+
87
97
  が該当します。
88
98
 
89
99
 

3

改行修正

2018/09/30 05:56

投稿

rapid_aoba
rapid_aoba

スコア13

test CHANGED
File without changes
test CHANGED
@@ -18,23 +18,25 @@
18
18
 
19
19
  (#http://tinyurl.com/jj22qv4)
20
20
 
21
- 抜粋:def __gt__(self,c2):
21
+ 抜粋:
22
22
 
23
- (中略)
23
+ ```def __lt__(self, c2):
24
24
 
25
- ```if self.value==c2.calue:
25
+ if self.value < c2.value:
26
26
 
27
- if self.suite >c2.suit:
27
+ return True
28
28
 
29
- return True
29
+ if self.value == c2.value:
30
30
 
31
- else:
31
+ if self.suit < c2.suit:
32
32
 
33
- return False
33
+ return True
34
34
 
35
- return False(←ここが該当箇所) 
35
+ else:
36
36
 
37
-
37
+ return False
38
+
39
+ return False
38
40
 
39
41
  ```
40
42
 
@@ -52,7 +54,9 @@
52
54
 
53
55
  183ページのコード本:27〜30行目、サイト33〜35行目(http://tinyurl.com/huwq8mw)
54
56
 
57
+ ```
58
+
55
- 抜粋: def play_game(self):
59
+ def play_game(self):
56
60
 
57
61
  cards = self.deck.cards
58
62
 
@@ -70,13 +74,15 @@
70
74
 
71
75
  break
72
76
 
73
- p1c = self.deck.rm_card() (←ここが該当箇所)
77
+ p1c = self.deck.rm_card() (ここが該当箇所)
74
78
 
75
79
  p2c = self.deck.rm_card()
76
80
 
77
81
  p1n = self.p1.name
78
82
 
79
83
  p2n = self.p2.name
84
+
85
+ ```
80
86
 
81
87
  が該当します。
82
88
 

2

言語名を表題に追記

2018/09/30 05:46

投稿

rapid_aoba
rapid_aoba

スコア13

test CHANGED
@@ -1 +1 @@
1
- elseの無いif文について
1
+ Python:elseの無いif文について
test CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  (中略)
24
24
 
25
- if self.value==c2.calue:
25
+ ```if self.value==c2.calue:
26
26
 
27
27
  if self.suite >c2.suit:
28
28
 
@@ -32,19 +32,23 @@
32
32
 
33
33
  return False
34
34
 
35
- return False(←ここが該当箇所) 
35
+ return False(←ここが該当箇所) 
36
36
 
37
37
 
38
38
 
39
+ ```
40
+
39
41
  181ページのコードの最後(http://tinyurl.com/jz8zfz7)
40
42
 
41
- 抜粋:def rm_card(self):
43
+ 抜粋:```def rm_card(self):
42
44
 
43
45
  if len(self.cards)==0:
44
46
 
45
47
  return
46
48
 
47
49
  return self.cards.pop() (←ここが該当箇所)
50
+
51
+ ```
48
52
 
49
53
  183ページのコード本:27〜30行目、サイト33〜35行目(http://tinyurl.com/huwq8mw)
50
54
 

1

初心者マーク追記

2018/09/30 05:37

投稿

rapid_aoba
rapid_aoba

スコア13

test CHANGED
File without changes
test CHANGED
File without changes