学年

質問の種類

情報:IT 高校生

教えてください😭😭😭😭😭😭

情報 Ⅰ ・Question ④ 「何らかの仕事を実現する処理の並びを一つにまとめて名前を付けたもの」 を関数といいます。 数は、値を渡したり戻したりできるのが特徴で、 関数に与える文字や数字を「引数」。返される値を 「戻り値」 といいます。 また、 もともとの主なプログラムをメインルーチン。 関数をサブルーチンと いいます。 関数 書式 234 def 関数名(引数1, 引数2, ….....): ロロロロ処理 | ロロロロ処理 2 0000 return 戻り値 説明 関数を定義する。インデントした範囲内がひとまとまりの関数と見なされる。 関数を呼び出す ときに同時に値を関数に渡したときは、引数の部分で受け取り、関数内部で使う。 関数内で 理した結果や何らかの値を呼び出し側に通知する場合は、 return に続けて値や計算式などを 記述する。 次のプログラムは、実行者の名前をメインルーチンで入力させて、それを関数に渡して挨拶と一緒 に表示するプログラムです。 1 def aisatu(a): 2 3 print (a, "Hello!") return 4 5 print("これから英語で挨拶します") 6 b = aisatu(input("Please name :")) 7 aisatu(b) 8 print("どうでしたか? ") 1 def aisatu (a): 上記のプログラムでは、挨拶の表示処理を関数側に行わせていましたが、値を戻してメインルーチ ンで行わせることもできます。 上記のプログラムをもとに、以下の空欄を埋めて、 プログラムを作り なさい。 (実行例は上記と同じ) (ファイル名は「出席番号 94 名前」 で保存すること) a= return 実行例 これから英語で挨拶します Please name: Taro Taro Hello ! どうでしたか? 5 print("これから英語で挨拶します") 6 b=input("Please name :") 7 print( 8 print("どうでしたか? ") 開始 「これから英語で挨拶 します」 と表示 名前を入力させる →関数に渡す aisatu 関数 戻り値を 受け取って表示 「どうでしたか?」 と表示 関数定義 終了 CITIO aisatu 関数開始 ← 受け取った引数 atak 「Hello!」を合体 a を戻り値 aisatu 関数終了

回答募集中 回答数: 0
情報:IT 高校生

期末課題なのですがテストが無い分これで成績が決まってしまうのですが全く分かりません💦教えて欲しいです

■アルゴリズムとプログラミング (課題) 以下の課題に取り組み、 作成したファイルをデスクトップに保存し、PCの「課題提出全日制」 → 「2学年」 「自分のクラスのフォルダー」→「問題番号に対応したフォルダー」にドラッグアンド ドロップして提出しなさい。 (作成できたファイルのみ提出すること) ・Question ① マウスの移動量を表す単位で 「ミッキー」というものがある。 | ミッキーあたり0.254mm(ミリ メートル) である。 以下のプログラムの空欄を埋めて、キーボードからマウスの移動量をミッキーで 入力されたら、 cm (センチメートル) で表示されるプログラムを作りなさい。 (ファイル名は 「出席番号 q1 名前」 で保存すること) 1 a = float(input("マウスを何ミッキー動かしましたか?>")) 2b = 3. print("あなたは", b, "センチメートル動かしました。 ") 実行例 マウスを何ミッキー動かしましたか? >100 あなたは 2.54センチメートル動かしました。 • Question ② 製 以下のプログラムの空欄を埋めて、 「おはよう」, 「さよなら」 と言われたら挨拶を返すプログラム を作りなさい。 (ファイル名は「出席番号 92 名前」 で保存すること) 1 a=str(input("挨拶をしてください>")) 2 if a | "おはよう": print("コンピュータ:", a) "さよなら": print("コンピュータ:", a) 3 4 elifa 5 6 else: 7 実行例 挨拶をしてください > おはよう コンピュータ:おはよう print("コンピュータ:よくわかりません") 挨拶をしてください > さよなら コンピュータ: さよなら 挨拶をしてください > こんにちは コンピュータ: よくわかりません 開始 at 挨拶をしてください> aは "おはよう Yes おはよう 終了 No. は さよなら Yes さよなら No. よくわかりませ

回答募集中 回答数: 0
英語 高校生

英語の選択問題を解いてみたのですが、自信が無いのでどなたか教えてくださると嬉しいです。 特に[1]と[2]が分かりません。

[1] Hello, everyone. Today, I want to ( you had ( C ) sleep last night? Let's say, more than seven hours? Today's (d ) is going to (e effects of lack of sleep. 1. among 6. introduction A a 2. depend 7. many b a 2 a ) a common problem ( b ) university students, lack of sleep. How many of ) on the causes and 5 [2] Finishing your assignments, preparing for exams, partying, or checking your smartphone these are the common (a ) why students stay up late. I understand that these are important ( b ) of university life. But today, I want to (c ) you that sleep actually ( d ). We need enough sleep because sleep deprivation can (e ) seriously negative impacts on our health. 1. ask 6. matters 2. become 7. parts b 3. discuss 8. presentation 4 C 3. cause 8. questions C 4. enough 9. talk 4 C 4. convince 9. reasons 5. focus 10. to d 8 d [3] First, lack of sleep (a ) affects your physical health. Research has shown that sleep deprivation can impact the immune ( b ). Consequently, to fight infections becomes more difficult, and we become more likely to get sick after being exposed to a ( C ). Moreover, if you regularly follow a poor sleeping schedule, your risk of developing serious (d) conditions increases ( e ), such as obesity, heart disease, and diabetes. 1. medical 2. negatively 3. significantly 4. system b d 5. just 10. situations. 4 e 5. virus e 3 e 3

解決済み 回答数: 1
英語 中学生

(3)(5)教えてください

10 15 2 次の英文は,中学生の久美子 (Kumiko) と母の対話です。 これを読んで,あとの各問いに答えなさい。 Mother: Yesterday morning, when I met some students, they said in *loud voices, “Good morning.” I felt very ( 1 ). Kumiko: I think they are students from my school. We always *greet each other when we meet. So I always greet everyone every day. 5 Mother: You are nice. People feel very good when they *exchange *greetings with each other. Kumiko: I agree. (2) Mother: That's right. I'll tell you another thing. Greetings can be the first *step in communication. If you start talking to people with a greeting first, you can talk with them more. Kumiko: Well .... I have one thing to tell you. Last Monday, we got a new student from Tokyo. Her name is Mika. She looked *nervous because that day was her ( ③ ) day in our class. (4) Mother: Kumiko: No. I wanted to talk with her, but I could not say anything. Then my friend Yuri said to her, “Hello. I'm Yuriko. Everyone calls me Yuri. Nice to meet you.” Soon Mika smiled and started talking to us. We really enjoyed talking with her. Greetings are very useful for opening people's *minds. I learned that from Yuri. I'll never forget this important experience. 6 〔注〕 loud (声音が大きい greet あいさつする exchange やり取りする step 一歩 nervous 緊張して mind 心 (1) ( ① ), ( ③ )に適する語の組み合わせをア~エから選び,記号で答えなさい。 ア ① surprised (3) easy 1 glad ③ important ウ 1 sad ③ exciting I ① happy ③ first 〔土〕 (2) 対話が成り立つように, ⑥ に適する文をア~エから1つずつ選び, 記号で答えなさい。 ア So it was difficult for us to greet her. イ After that, we told her many things about our school. ウ A nice greeting can make them happy. エ You should work hard to have a better school life. (3) 対話が成り立つように, ④に適する疑問文を書きなさい。 (4) 下線部⑤とほぼ同じ内容を表すように, に適する語を書きなさい。 I am called Yuri by everyone. (5) 下線部⑦ が指す具体的な内容を日本語で答えなさい。 greeting あいさつ ②〔ウ] ⑥[イ] 日の ARNOX

解決済み 回答数: 1