Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
第3回python勉強会~基礎編~
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
iwanaga
June 05, 2021
Technology
480
0
Share
第3回python勉強会~基礎編~
iwanaga
June 05, 2021
More Decks by iwanaga
See All by iwanaga
第2回ディープラーニング勉強会~画像処理編~
ganchan11
0
300
第1回ディープラーニング勉強会~画像処理編~
ganchan11
0
270
第0回ディープラーニング勉強会(演習問題、訂正)
ganchan11
0
440
第0回ディープラーニング勉強会~画像処理編~資料
ganchan11
1
780
第3回python勉強会(解答)
ganchan11
0
340
第2回python勉強会(解答編)
ganchan11
0
430
第2回python勉強会~基礎編~
ganchan11
0
610
第1回python勉強会~インストール編~
ganchan11
0
660
Other Decks in Technology
See All in Technology
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.4k
Oracle Cloud Infrastructure:2026年4月度サービス・アップデート
oracle4engineer
PRO
0
120
Do Vibe Coding ao LLM em Produção para Busca Agêntica - TDC 2026 - Summit IA - São Paulo
jpbonson
3
160
AgentCore×VPCでの設計パターンn選と勘所
har1101
4
330
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
610
AndroidアプリとCopilot Studioの統合
nakasho
0
170
UIライブラリに依存しすぎないReact Native設計を目指して
grandbig
0
150
AIが盛んな時代に 技術記事を書き始めて起きた私の中での小さな変化
peintangos
0
250
20260428_Product Management Summit_tadokoroyoshiro
tadokoro_yoshiro
14
15k
これからの「データマネジメント」の話をしよう
sansantech
PRO
0
160
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
400
Class.new is all you need
riseshia
1
190
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
720
Rails Girls Zürich Keynote
gr2m
96
14k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
190
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
280
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
140
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
HDC tutorial
michielstock
2
630
Transcript
第3回python勉強会 〜基礎編〜
⾃⼰紹介 • 岩永拓也 • 九州⼯業⼤学 情報⼯学部 4年 • 藤原研究室 アルゴリズム
• 趣味:ゲーム、読書、ボードゲーム • エディタ:Atom
復習 • 基本⽂法(print)
復習 • 基本⽂法(演算)
復習 • 基本⽂法(変数)
復習 • 基本⽂法(input)
復習 • 基本⽂法(if⽂)
復習 • 基本⽂法(for⽂)
復習 • 基本⽂法(while⽂)
復習問題 • FizzBuzz問題 1~15の間で 3で割り切れるときにFizz 5で割り切れるときにBuzz 15で割り切れるときにFizzBuzz と表⽰し、それ以外の数はそのまま表⽰しなさい
配列 • 変数は箱なら配列は箱の集まりみたいなもの • 注意→「0」からスタート • イメージ図1
配列 • 例
配列 • 追加⽅法→append関数を使⽤! • 例3
配列 • 2次元配列 • 1次元配列はイメージ図1のもの • 2次元配列はイメージ図2のようなもの • イメージ図2
配列 • 例4:2次元配列
関数 • 数学での関数 →2 つの変数 𝑥と 𝑦があり、 𝑦の値が 𝑥の値にともなって変化し𝑥の値を定める と𝑦の値がただ⼀つに決まる
例:𝑦 = 𝑥! + 𝑥 + 3 • プログラムでの関数 →さまざまな処理が機能として1つにまとまっているもの
関数 • 例 ハンバーガーショップ
関数 引数 返り値
format⽂ • ⽂字列内に変数を埋め込むことができる • ⽂字列内で動的に代わる変数を利⽤できる • 基本的な書き⽅
format⽂ • 例
辞書 • 特定の要素を検索したり、追加や削除も簡単にできるもの • 基本的な書き⽅
辞書 • 例 ⾊と果物の辞書
演習問題(基礎) • a=[0,12,-1,4,56,7,0.8,63,21,89]の配列の中で⼀番⼤きい値を出⼒する関数を作成 • a=[0,12,-1,4,56,7,0.8,63,21,89]の配列の中で⼀番⼩さい値を出⼒する関数を作成 ヒント→引数で配列を使⽤するとき定義した配列の名前を⼊れる。 例 配列:a=[0,1,2] 関数:function(a)
演習問題(応⽤) • 三⽬並べを作成 • 三⽬並べのルール →3✖ 3の盤⽤意し、⼆⼈が交互に「◦」と「 ✖ 」 を書き込んでき3つ並べるゲーム
演習問題解答(基礎)