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
iwanaga
June 05, 2021
Technology
0
470
第3回python勉強会~基礎編~
iwanaga
June 05, 2021
Tweet
Share
More Decks by iwanaga
See All by iwanaga
第2回ディープラーニング勉強会~画像処理編~
ganchan11
0
300
第1回ディープラーニング勉強会~画像処理編~
ganchan11
0
260
第0回ディープラーニング勉強会(演習問題、訂正)
ganchan11
0
430
第0回ディープラーニング勉強会~画像処理編~資料
ganchan11
1
770
第3回python勉強会(解答)
ganchan11
0
340
第2回python勉強会(解答編)
ganchan11
0
420
第2回python勉強会~基礎編~
ganchan11
0
600
第1回python勉強会~インストール編~
ganchan11
0
650
Other Decks in Technology
See All in Technology
ガバメントクラウドの概要と自治体事例(名古屋市)
techniczna
3
240
Railsの話をしよう
yahonda
0
160
速習AGENTS.md:5分で精度を上げる "3ブロック" テンプレ
ismk
6
1.8k
難しいセキュリティ用語をわかりやすくしてみた
yuta3110
0
300
衛星画像超解像化によって実現する2D, 3D空間情報の即時生成と“AI as a Service”/ Real-time generation spatial data enabled_by satellite image super-resolution
lehupa
0
190
いまからでも遅くない!SSL/TLS証明書超入門(It's not too late to start! SSL/TLS Certificates: The Absolute Beginner's Guide)
norimuraz
0
270
Introdução a Service Mesh usando o Istio
aeciopires
0
210
Azureコストと向き合った、4年半のリアル / Four and a half years of dealing with Azure costs
aeonpeople
1
180
ビズリーチ求職者検索におけるPLMとLLMの活用 / Search Engineering MEET UP_2-1
visional_engineering_and_design
1
160
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
12
81k
FinOps について (ちょっと) 本気出して考えてみた
skmkzyk
0
140
「改善」ってこれでいいんだっけ?
ukigmo_hiro
0
350
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Bash Introduction
62gerente
615
210k
We Have a Design System, Now What?
morganepeng
53
7.8k
Agile that works and the tools we love
rasmusluckow
331
21k
Being A Developer After 40
akosma
91
590k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Designing for humans not robots
tammielis
254
26k
GitHub's CSS Performance
jonrohan
1032
470k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
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つ並べるゲーム
演習問題解答(基礎)