teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

2018/04/30 18:50

投稿

okita_inf
okita_inf

スコア7

title CHANGED
File without changes
body CHANGED
File without changes

2

2018/04/30 18:50

投稿

okita_inf
okita_inf

スコア7

title CHANGED
File without changes
body CHANGED
@@ -1,3 +1,4 @@
1
+ ``` python
1
2
  import random
2
3
 
3
4
  user = input("ゲームを開始しますか?Yes = 1 , No = 2")
@@ -5,11 +6,12 @@
5
6
  gojuuon = [
6
7
  "あ","い","う","え","お"]
7
8
  bunsyou = [
8
- "毎日見るもの"
9
+ "毎日見るもの",
9
- "人間に必要なもの"
10
+ "人間に必要なもの",
10
11
  "楽しいもの"]
11
12
  i = random.randint(0,len(gojuuon) - 1)
12
13
  v = random.randint(0,len(bunsyou) - 1)
13
14
 
14
- odai = "{0}で始まる{1}".format(i, v)
15
+ odai = "{0}で始まる{1}".format(gojuuon[i], bunsyou[v])
15
- print(odai)
16
+ print(odai)
17
+ ```

1

2018/04/26 16:03

投稿

okita_inf
okita_inf

スコア7

title CHANGED
@@ -1,1 +1,1 @@
1
- エラーはならなですが、インプットで1を入力した後が実行されません。 間違っているところを教えてください。
1
+ "あで始まる毎日見るもの" のようしたいです。エラーは出ません"ゲームを始めますか?〜" の質問後に1を入力後、>>>出て、後が実行されません。その後の表示の仕方を教えてください。
body CHANGED
File without changes