Submit Search
Upload
Python勉強会 2015-12-10
•
0 likes
•
531 views
WoodPecker (Shizuoka Univ)
Follow
身内用Python勉強会資料.pythonのプログラムを動かす方法,print文を使う,変数と四則演算,コメントなど.
Read less
Read more
Technology
Report
Share
Report
Share
1 of 26
Download now
Download to read offline
Recommended
Products.PloneOrg
Products.PloneOrg
Takanori Suzuki
OSS開発勉強会-01B
OSS開発勉強会-01B
Kohei KaiGai
Python と私の事情
Python と私の事情
tsudaa
初心者がGoでcliツール作ってみて学んだこと
初心者がGoでcliツール作ってみて学んだこと
Shota Inoue
Python3 プログラミング勉強会
Python3 プログラミング勉強会
Tetsuya Morimoto
Pynyumon03 LT
Pynyumon03 LT
drillan
PyPy 紹介
PyPy 紹介
shoma h
Python界隈の翻訳プロジェクト
Python界隈の翻訳プロジェクト
Tetsuya Morimoto
Recommended
Products.PloneOrg
Products.PloneOrg
Takanori Suzuki
OSS開発勉強会-01B
OSS開発勉強会-01B
Kohei KaiGai
Python と私の事情
Python と私の事情
tsudaa
初心者がGoでcliツール作ってみて学んだこと
初心者がGoでcliツール作ってみて学んだこと
Shota Inoue
Python3 プログラミング勉強会
Python3 プログラミング勉強会
Tetsuya Morimoto
Pynyumon03 LT
Pynyumon03 LT
drillan
PyPy 紹介
PyPy 紹介
shoma h
Python界隈の翻訳プロジェクト
Python界隈の翻訳プロジェクト
Tetsuya Morimoto
ネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdf
ネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdf
Takayuki Nakayama
2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用
2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用
KLab Inc. / Tech
Keywordmap overview material/CINC.co.ltd
Keywordmap overview material/CINC.co.ltd
kokinagano2
Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介
Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介
Hyperleger Tokyo Meetup
LoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイル
LoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイル
CRI Japan, Inc.
情報を表現するときのポイント
情報を表現するときのポイント
onozaty
MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。
iPride Co., Ltd.
LoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアル
LoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアル
CRI Japan, Inc.
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
More Related Content
Recently uploaded
ネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdf
ネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdf
Takayuki Nakayama
2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用
2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用
KLab Inc. / Tech
Keywordmap overview material/CINC.co.ltd
Keywordmap overview material/CINC.co.ltd
kokinagano2
Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介
Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介
Hyperleger Tokyo Meetup
LoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイル
LoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイル
CRI Japan, Inc.
情報を表現するときのポイント
情報を表現するときのポイント
onozaty
MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。
iPride Co., Ltd.
LoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアル
LoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアル
CRI Japan, Inc.
Recently uploaded
(8)
ネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdf
ネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdf
2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用
2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用
Keywordmap overview material/CINC.co.ltd
Keywordmap overview material/CINC.co.ltd
Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介
Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介
LoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイル
LoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイル
情報を表現するときのポイント
情報を表現するときのポイント
MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。
LoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアル
LoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアル
Featured
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Featured
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Python勉強会 2015-12-10
1.
@yumechi0525
2.
• Pythonスクリプトを実行しよう • 簡単な四則演算をしてみよう •
演算した結果を出力してみよう 2015/12/13 2
3.
• 適当にフォルダを作成して,空のファイ ルを作る.ファイル名も適当に. • 拡張子を.pyにすることだけを忘れない •
わかり易い場所がいいと思うので,今回 はUserフォルダの直下にPythonStudy というフォルダを作る 2015/12/13 3
4.
• フォルダに移動したら,Hello.pyという 空のファイルを作成 • 適当なテキストエディタで開き, •
print(“Hello World!”) • と入力 2015/12/13 4
5.
2015/12/13 5
6.
• pyhton2の場合は, • print
“Hello World!” • でよい(カッコ入りません) • 前回行ったとおり,python2系と python3系は別の言語と考えるべき 2015/12/13 6
7.
• Windows – コマンドプロンプトを開く •
アクセサリとかから行くか,Windows+rでcmd – スクリプトを置いたフォルダに移動 – python hello.py – と打ち込んでみよう! 2015/12/13 7
8.
• Mac – terminalを開く •
Control+Spaceでterminalって打ち込むとか – スクリプトを置いたフォルダに移動 – python3 hello.py – と打ち込んでみよう! – (2系の場合は python hello.py) 2015/12/13 8
9.
2015/12/13 9
10.
• 昔のC言語のテキストの名残らしい – Wikipediaいわく –
https://ja.wikipedia.org/wiki/Hell o_world 2015/12/13 10
11.
• 9 *
11 の計算結果を出力してみよう • print(9 * 11) • 毎回printの中身を変えるのは面倒 -> 変数を使おう 2015/12/13 11
12.
• 変数とは? – データを入れておく箱みたいなもの –
数値とか,文字列とか,リストとかが入る – というか何でも入る(動的型付け) • 型のあるC言語(静的型付け)と大きく違う点 2015/12/13 12
13.
• hello.pyに以下のものを追加 i1 =
9 i2 = 10 print(i1 * i2) print("%d" % (i1 * i2)) • そしてhello.pyをもう一度実行! 2015/12/13 13
14.
2015/12/13 14
15.
• 変数に入れると使い回しや,変更が容易 • 例えば,i1とi2を単独に表示したい場合や i1とi2を入れ替えて単独に表示したい場合, どうするのか? 2015/12/13
15
16.
print(9 * 10) print(9) print(10) •
楽...?(そもそも入れ替わっている かどうかが検証不可 • 3405069409240843 x • 3209430964094399とかだったら大変 (適当に大きい数) 2015/12/13 16
17.
i1 = 9 i2
= 10 print(i1 * i2) print(i1) print(i2) i1, i2 = i2, i1 # 数値の入れ替え print(i1) print(i2) • 大きな数字が来ても,代入部分を変えるだけ で済む 2015/12/13 17
18.
• 足し算 1+2 •
引き算 5-3 • 掛け算 5*6 • 割り算(整数同士) 10//3 # -> 3 • 割り算 10/3 # -> 3.3333333 • 割り算のあまり 10%3 -> 1 • 割り算の書き方が他の言語と違うので注意! 2015/12/13 18
19.
• 実は文字列も演算ができる • 連結が+,繰り返しが*で行える str1
= "moji" str2 = "word" str3 = str1 + str2 print(str3) # -> mojiword print(str1 * 3) # -> mojimojimoji 2015/12/13 19
20.
2015/12/13 20
21.
• Pythonスクリプトを実行しよう – cmdでpython
hoge.py – terminalでpython3 hoge.py • 簡単な四則演算をしてみよう – +,-,*,//,/,% などなど • 演算した結果を出力してみよう – printを使う 2015/12/13 21
22.
• 分岐 – if文 •
繰り返し – while文 – for文 # ちょっと特殊なので注意 • 標準入力 – input() – 2系と3系で大きく動作が違うので注意 2015/12/13 22
23.
• python特有のテクニック • 値の入れ替え –
普通の言語の場合 • int temp = i1; • i2 = i1; • i2 = temp; – pythonの場合 • i1,i2 = i2,i1 – コードを短くするのに便利かも? 2015/12/13 23
24.
• printのformatですが,もう少し細かくできる みたい(あまり使ったことがない) • 以下は公式ドキュメントより. •
print('The story of {0}, {1}, and {other}.'.format('Bill', 'Manfred', other='Georg')) • → The story of Bill, Manfred, and Georg. 2015/12/13 24
25.
• # 以降はコメントとして扱われる •
複数行に渡るコメントの場合は, """ pythonスクリプトの動かし方 cmdで python hoge.py """ • のように,ダブルクオーテーション3つで 囲む 2015/12/13 25
26.
• 公式ドキュメント 7.
入力と出力 – http://docs.python.jp/3/tutorial/inputout put.html • あと,今回作ったプログラムを置いとき ました – https://gist.github.com/yumechi/065546 51da3c2a29ce1e 2015/12/13 26
Download now