Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
if文(条件分岐)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Rumi Yamaguchi
December 06, 2021
Programming
27k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
if文(条件分岐)
[追加] 2022/02 比較演算子
Rumi Yamaguchi
December 06, 2021
More Decks by Rumi Yamaguchi
See All by Rumi Yamaguchi
for文(繰り返し処理)
rumi_yamaguchi
0
1.2k
今までの振返り +α
rumi_yamaguchi
0
680
リスト型,辞書型
rumi_yamaguchi
0
2.9k
Other Decks in Programming
See All in Programming
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
180
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
1.5k
Modernizing iOS Apps
seyfoyun
0
150
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
140
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
230
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
200
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
730
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.4k
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
14
11k
No More NoSuchMethodError
exoego
1
120
Spec-driven Development with AI
simas
PRO
0
2.2k
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
380
Featured
See All Featured
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
240
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
760
Game over? The fight for quality and originality in the time of robots
wayneb77
1
320
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
760
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
510
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
Marketing to machines
jonoalderson
1
6k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Transcript
JGจ ݅ذ © Rumi Yamaguchi
実⾏ 書いたコードを実⾏す るため,ターミナルの 扱い⽅に触れた. コードを書く • 算術演算 • 変数 •
リスト,辞書型 などの⽂法を触れた. (.py エディタ) 環境構築 • Python3の実⾏環境 • エディタ(VS Code) のインストールを⾏った. લճʜ © Rumi Yamaguchi 前回まで 条件分岐イメージ if⽂ FAQ 全体の流れを,1周体感できるようになろう!!
ίʔυͷجຊతͳॲཧ 前回まで 条件分岐イメージ if⽂ FAQ © Rumi Yamaguchi 順次処理 条件分岐
繰り返し 算術演算,変数などの代⼊や再代⼊,処理 リスト/辞書などの複数データ代⼊,処理 変数やリスト/辞書内の値を, 条件によって処理を変えること 1つの処理を繰り返すこと. New!!
݅ذͷΠϝʔδ 前回まで 条件分岐イメージ if⽂ FAQ 70点 テスト受験 合格 (おわり) 再テスト受験
© Rumi Yamaguchi ・・・ True False
͓ण͕࢘৯ΕΔͷ͔൱͔ 前回まで 条件分岐イメージ if⽂ FAQ © Rumi Yamaguchi int型変数のmoneyに代⼊されている値に応じて True
or Falseが振り分けられる事もできます.
JGจ 5SVFͷ߹ 前回まで 条件分岐イメージ if⽂ FAQ © Rumi Yamaguchi
݅Λ૿͢͜ͱ͕Ͱ͖Δʜ 前回まで 条件分岐イメージ if⽂ FAQ うな重 7000円 財布にmoney円 ⾷べれる 買える範囲のもの
を買いましょう © Rumi Yamaguchi True False ステーキ 5000円 ステーキ 5000円 直前までの条件式でFalseだった場合, 次の条件ではTrueかFalseか と条件式を増やすことができます.
JGจʢFMJGͰ݅ࣜΛ૿͢ͱ͖ʣ if 条件式1: 条件式1がTrueのときに⾏う処理 elif 条件式2: 条件式1がFalseで条件式2がTrueのときに⾏う処理 elif 条件式3: 条件式1,
2がFalseで条件式3がTrueのときに⾏う処理 … else: すべての条件式がFalseのときに⾏う処理 前回まで 条件分岐イメージ if⽂ FAQ © Rumi Yamaguchi
JGจ 前回まで 条件分岐イメージ if⽂ FAQ © Rumi Yamaguchi インデントを下げてTrueのときの 処理を記述.
インデントの段階は揃える. (半⾓スペース4つ分 or Tabキー) 条件式の⾏末は「コロン(:)」 (Shift + け)
࣮ߦํ๏ 前回まで 条件分岐イメージ if⽂ FAQ © Rumi Yamaguchi VS Code内で,ターミナルを開き実⾏してみましょう.
「python3」と⼊⼒し,半⾓スペースを押してから, ファイルのタブをドラッグ&ドロップし,Enter/Returnを押しましょう.
ൺֱԋࢉࢠ ه © Rumi Yamaguchi x == y x と
y が等しい x!= y x と y が等しくない x > y x xは y よりも⼤きい x < y x は y よりも⼩さい x >= y x は y と等しいか⼤きい x <= y x は y と等しいか⼩さい x in y x という要素 が y に存在する x not in y x という要素 が y に存在しない yはリストや辞書の変数を⽤いることが多い 前回まで 条件分岐イメージ if⽂ FAQ