学年

教科

質問の種類

情報:IT 高校生

(5)についてです。 return 1とはどういうことですか?この場合kazuは5なので関係ないですか?

表示するに をひとまとまり する。 (kazu を指す。 8], [11, 0から ・参照す 値配 H ものを てい Foxr- を返す関数である。 (1) Tokuten [50, 40, (2) saidai 0 (3) bango=0 (4) 10から (5) (6) (7) ..(D), 35, 70] ① まで1ずつ増やしながら繰り返す もしTokuten [1] (2) saidaiならば! saidai Tokuten[i] bango- (日) 表示する(最高点 1 ', saidai, "出席番号 (イ) (エ) () (Tokuten) + (Tokuten) 1 < 素数 (Tokuten) (7) bango (ケ) (1)> bango + 1 -1 (カ 444 saidai 配 Takuten 要素を比較する (関数) 次のプログラムの(1)~(3),(5)5が,(4)12が入力された場合に「答え は」に続いて表示されるも def funcl (kazu): x = kekka=0 for i in range (1, kazu + 1): kekka = kekka + i return kekka int(input('正の整数を入力)) 8 print('答えは', func1 (x)) (3) 234 def func3 (kazu): pai = 3.14 (2) 1 kekka = 1 for i in range (kazu, 0, -1) def func2(kazu): 2 3 4 5 6 7 kekka = kekka * 1 return kekka x = int(input('正の整数を入力 8 print('答えは', func2 (x)) (4) return pai * kazu * kazu 3 15 x = float(input('正の数を入力) 6 print('答えは', func3(x)) def func4(kazu): kekka = [] for i in range(1, kazu if kazu i == 0: kekka.append(i 6 return kekka 7 14 15 (5) def func5(kazu): if kazu == 0: return 1 return kazu * func5 (kazu-1) 6 x = int(input('正の整数を入力リ) 7 print('答えは', func5(x)) 8 x = int(input('正の整数を入 9 print('答えは', func4(x)) input()の戻り値は文字列であ ため,(3)では float() を使って 小数点型に,そのほかは int( ) 数型に変換している。

解決済み 回答数: 1
情報:IT 高校生

どうなっているのかがわかりません。2行目はどういう意味なのでしょうか。

トログラミング 5でも割り切れる,つまり15で割り切れれば FIZZ BUZZ と表示し、それ以外は何も表示しないプログラムである。 例題 3 繰り返し構造と数え上げ 加算 類題 6.8 次の(1),(2)のプログラムを実行した結果,画面に表示されるものを記せ。 なお, 「range(5)」は, 0から5未 満の整数を返す組み込み関数である。 (1) 1234 (2) x = 0 for i in range (5): x = x + 1 4 print(x) 123 x = 0 2 for i in range(5): x = x + i 4 print(x) 2 の場合が るが、 elif は 件に当てはま はまらな 仙台の中で、 件を指定して 付象を決める る。 解答 (1) 5 (2)8,1,3,6,10(縦に表示) ベストフィット 繰り返し処理を使い, 数え上げや加算を行う。 繰り返しの対象範囲に注意する。 海頂 ( 20. 基本的なプログラミング 解説 (1)2)の2行目は,iを0から4まで1ずつ増やしながら5回繰り返しを行う for文である。 繰り返しの対象行は,(1)は3 行目のみ,(2)は3・4行目であることがインデントからわかる。よって, print(x) は,(1)は1回,(2)は5回実行される。 (1)2)の3行目の「x = x + ○」は, 「x に○を加えた結果を x に代入する」処理である。(1)では「1」を,(2)では「i(1ずつ増えて いく変数)」を繰り返し加算する。 93 93

解決済み 回答数: 1
英語 高校生

教えて下さい

[3] 次の英文を読み, 各問いに答えなさい。 [思•判・表] (教科書 P.106~107 参照) Good morning, everyone. Today I am going to tell you about orienteering. Do you know orienteering? Maybe some of you have experienced it. You might think it's like a game in the woods, where you use a map and compass to find some flags. Well, orienteering is also a competitive sport. It started in Sweden, and is most popular in Scandinavia. [4 (1) (2) (3) In an orienteering event, ( ① )competes alone, wearing a running suit that protects them from the weather and the bush. At the starting line, runners start at least one minute apart. When you are told to go, you are given the map for the first time. You then use your compass and the map to find a series of points in the forest. At experienced levels, the points are often far from roads. At each point, there is an orange and white box flag. There, you punch your card. You may not go to points in the wrong order. After all of the runners have passed the finish line, the person with the fastest time in each category of sex and age range is the winner. I tried orienteering once in elementary school, but I'd like to try it someday in a competitive event. Thank you for listening. (1)( ①)にふさわしい主語を選択肢から選び, 記号で答えなさい。 ア. all people イ. each person ウ. all players (2) the loser (敗者) と反対の意味を表す語句を第二段落から探し出し, 解答欄に書きなさい。 (3) 説明されている競技において、以下のア~エを進行順に並べ替えて、3番目にくるものを記号で答えなさい。 ア. 走者達はコンパスと地図を用いて, 森の中の一連のチェックポイントをさがす。 イ. 全走者が走り終えた後, それぞれの性別や年齢層でいちばん時間が速かった人が勝者となる。 ウ. それぞれのチェックポイントには, オレンジと白の旗 (box flag)があり、 そこで自分のカードにパンチで穴をあける。 エ. 走者達はスタートしていいと言われたとき、 初めて地図が渡される。 【

解決済み 回答数: 1
英語 高校生

答えあっていますでしょうか🥲🥲

10. Jimmy's lecture made a great impression on all (1) present. Those present th bate that (4 whoever )<所有格名詞>の代わり所有代名詞) tarel 2 who boque③those 11. My idea is quite similar to ( 19/10 1 you 2 your 12.( 3. yours = your ori idea 4 yourself 〈高知大〉 〈共立女子大〉 ) was given to me by my grandfather ten years ago. ++1 86}] 1 This old watch of me 3 My old watch of this all 2 This my old watch que (4 This old watch of mine いっしょにならべるにはこの形 〈名城大〉 3 either 13. I asked two people the way to the national library but ( ) br) of them knew. neither (of A (大 ①none 2 both 14. Since he got married, he has not seen ( ④neither vsAのどちらも~ない 〈法政大〉 1 no 15. I have two sons, ( 2 either ① one 2 all ) of his parents. neither 3 neither ) of whom are college students. 3) anyone = not either (JA) 4 none either (of AXAの)どちらか一 <中央大 > both (of A) (A) ④ both 〈日本大〉 16. "Do you have any questions?" "No, I have ( 1 no )." no 名詞の代わりにnoneが使える 2 neither 3 none 4 never 〈女子栄養大〉 17. Jim and I gave gifts to each() each other 「お互い」という意味の代名詞 副 1 another animed to nonst 18. The store had ( 1 all (大和工業〒) 3 others 4 the other 2 other bail off astotiloge smood of miri bajnew alergy ) kind of strange animal you could imagine. every 3 several ④every 2 whole 〈広島国際学院大 〉 〈日本大〉 74

解決済み 回答数: 1