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

回答編集履歴

3

修正

2020/10/28 08:59

投稿

sfdust
sfdust

スコア1137

answer CHANGED
@@ -12,4 +12,4 @@
12
12
 
13
13
  とした場合どうでしょうか。
14
14
 
15
- (Tokyoを{city}に変える&"http の前にあるfを削除。)
15
+ (Tokyoを{city}に変える& apikeyをkeyにする & "http の前にあるfを削除。)

2

修正

2020/10/28 08:58

投稿

sfdust
sfdust

スコア1137

answer CHANGED
@@ -1,5 +1,5 @@
1
1
  ```
2
- api = "http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={MMM}"
2
+ api = f"http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={apikey}"
3
3
 
4
4
 
5
5
  ```
@@ -7,7 +7,9 @@
7
7
 
8
8
 
9
9
  ```
10
- api = "http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={key}"
10
+ api = "http://api.openweathermap.org/data/2.5/forecast?q={city}&APPID={key}"
11
11
  ```
12
12
 
13
- とした場合どうでしょうか。
13
+ とした場合どうでしょうか。
14
+
15
+ (Tokyoを{city}に変える&"http の前にあるfを削除。)

1

修正

2020/10/28 08:57

投稿

sfdust
sfdust

スコア1137

answer CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
  ```
10
- api = f"http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={apikey}"
10
+ api = "http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={key}"
11
11
  ```
12
12
 
13
13
  とした場合どうでしょうか。