回答編集履歴

3

修正

2020/10/28 08:59

投稿

sfdust
sfdust

スコア1135

test CHANGED
@@ -26,4 +26,4 @@
26
26
 
27
27
 
28
28
 
29
- (Tokyoを{city}に変える&"http の前にあるfを削除。)
29
+ (Tokyoを{city}に変える& apikeyをkeyにする & "http の前にあるfを削除。)

2

修正

2020/10/28 08:58

投稿

sfdust
sfdust

スコア1135

test CHANGED
@@ -1,6 +1,6 @@
1
1
  ```
2
2
 
3
- api = "http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={MMM}"
3
+ api = f"http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={apikey}"
4
4
 
5
5
 
6
6
 
@@ -16,10 +16,14 @@
16
16
 
17
17
  ```
18
18
 
19
- api = "http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={key}"
19
+ api = "http://api.openweathermap.org/data/2.5/forecast?q={city}&APPID={key}"
20
20
 
21
21
  ```
22
22
 
23
23
 
24
24
 
25
25
  とした場合どうでしょうか。
26
+
27
+
28
+
29
+ (Tokyoを{city}に変える&"http の前にあるfを削除。)

1

修正

2020/10/28 08:57

投稿

sfdust
sfdust

スコア1135

test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  ```
18
18
 
19
- api = f"http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={apikey}"
19
+ api = "http://api.openweathermap.org/data/2.5/forecast?q=Tokyo&APPID={key}"
20
20
 
21
21
  ```
22
22