Python Speed Learning

Size: px
Start display at page:

Download "Python Speed Learning"

Transcription

1 Python Speed Learning 1 / 76

2 Python 2 1 $ python 1 >>> / 76

3 print : 1 print : ( ) 3 / 76

4 print : 1 print 1 2 print hello 3 print print 7/3 5 print abs(-5*4) 4 / 76

5 print : 1 print 1 2 print hello 3 print print 7/3 5 print abs(-5*4) : hello / 76

6 ,, (/) 7 / / / float(3) / 76

7 : 1 = : ( ; variable), 6 / 76

8 :?, python? 1 a = print a 3 b = a print b 5 a = a print a 7 / 76

9 :?, python? 1 a = print a 3 b = a print b 5 a = a print a : / 76

10 ... : 1 a = print a 3 print b 8 / 76

11 ... : 1 a = print a 3 print b : Traceback (most recent call last): 3 File "a.py", line 3, in <module> 4 print b 5 NameError: name b is not defined 8 / 76

12 :.,, ( ),., 1. : x, y, tanaka, Kouji Uehara, World Cup 2013 : J-League, hungry?, 4WD 9 / 76

13 : 1 def (,,...): : 10 / 76

14 : 1 # 2 def f(x, y): 3 a = x + y 4 return a * a 5 6 # ( ) 7 print f(10, 20) / 76

15 : 1 # 2 def f(x, y): 3 a = x + y 4 return a * a 5 6 # ( ) 7 print f(10, 20) + 30 : / 76

16 python, 1 def f(x, y): 2 a = x + y 3 return a * a 4 print f(10, 20) f ( ) 2 print. 1,f(10, 20) , f(10, 20) x=10, y=20 f 3 return : 1 return,, 12 / 76

17 :?, python? 1 def f(x, y): 2 print 1 3 print hello 13 / 76

18 :?, python? 1 def f(x, y): 2 print 1 3 print hello! 13 / 76

19 :? 1 def f(x, y): 2 print x 3 print y 4 return x + y 5 6 print f(10, 20) 14 / 76

20 :? 1 def f(x, y): 2 print x 3 print y 4 return x + y 5 6 print f(10, 20) / 76

21 :? : 1 def f(x, y): 2 print x 3 print y 4 x + y 5 6 print f(10, 20) 15 / 76

22 :? : 1 def f(x, y): 2 print x 3 print y 4 x + y 5 6 print f(10, 20) : None 15 / 76

23 :? : 1 def f(x, y): 2 print x 3 print y 4 x + y 5 6 print f(10, 20) : None (return ). return,,, None 15 / 76

24 :? : 1 def f(x, y): 2 print x 3 print y 4 x + y 5 6 print f(10, 20) / 76

25 :? : 1 def f(x, y): 2 print x 3 print y 4 x + y 5 6 print f(10, 20) + 30 : Traceback (most recent call last): 4 File "a.py", line 6, in <module> 5 TypeError: unsupported operand type(s) for +: NoneType and int 16 / 76

26 :? : 1 def f(x, y): 2 print x 3 print y 4 x + y 5 6 print f(10, 20) + 30 None, 30, : Traceback (most recent call last): 4 File "a.py", line 6, in <module> 5 TypeError: unsupported operand type(s) for +: NoneType and int 16 / 76

27 1 def f(x, y): 2 print hello 3 print bye 4 print 10 5 f(30, 40) 17 / 76

28 1 def f(x, y): 2 print hello 3 print bye 4 print 10 5 f(30, 40) hello 3 bye print hello, print bye f ( ) print 10 f f(30,40), print hello, print bye 17 / 76

29 Python 1 def f(x): 2 print x 3 print x+1 1 File "a.py", line 3 2 print x+1 3 ^ 4 IndentationError: unexpected indent 18 / 76

30 Python 1 print 10 2 def f(x): 3 print x 4 5 print 20 1 File "a.py", line 5 2 print 20 3 ^ 4 IndentationError: unindent does not match any outer indentation level 19 / 76

31 Emacs Emacs Python (xxx.py), Tab ( C-i), Tab, 20 / 76

32 1 def f(x): 2 print x 3 y = x return y * y 5 def g(x): 6 y = f(x + 1) 7 print x 8 return x + y 9 print g(10) 21 / 76

33 1 def f(x): 2 print x 3 y = x return y * y 5 def g(x): 6 y = f(x + 1) 7 print x 8 return x + y 9 print g(10) / 76

34 ,. : 1 def f(x, y): 2 return x - y 3 4 print f(2, 3) # x=2, y=3, x, y 1 print f(y=10, x=20), 22 / 76

35 ,, ( ) 1 def g(x, y=1): 2 return x - y 3 4 print g(2) # x=2, y=1 5 print g(x=2) # x=2, y=1 6 print g(2, 3) # x=2, y=3 7 print g(x=2, y=3) # x=2, y=3 8 print g(y=3) # NG x Visual Python, numpy, 23 / 76

36 : 1 def f(x): 2 print x 3 y = x return y * y 5 def g(x): 6 y = f(x + 1) 7 print x 8 return x + y 9 print g(10), f x (y) g x (y),?. ( ) ( ) 24 / 76

37 1 def f(x): 2 y = x f(10) 4 print y : 1 Traceback (most recent call last): 2 File "a.py", line 5, in <module> 3 print y 4 NameError: name y is not defined 25 / 76

38 ( ), 1 z = 10 2 def f(x): 3 return x + z 4 print f(20) 5 z = 30 6 print f(20) 26 / 76

39 ( ), 1 z = 10 2 def f(x): 3 return x + z 4 print f(20) 5 z = 30 6 print f(20) : , ( ) 26 / 76

40 import : 1 from import * : 27 / 76

41 import : 1 print cos(0.1) : 1 Traceback (most recent call last): 2 File "a.py", line 1, in <module> 3 print cos(0.1) 4 NameError: name cos is not defined : 1 from math import * # math import 2 print cos(0.1) : / 76

42 import : 1 from visual import * 2 sphere() : 29 / 76

43 import : 1 import : from import *,,. 1 import visual 2 visual.sphere(), OK, 30 / 76

44 Python Python Visual Python, Matplotlib, numpy? ( )? python, dir( ) 1 from visual import * 2 print dir(visual) 1 [ ALLOW_THREADS, BUFSIZE, sphere,... ] 31 / 76

45 print (print ) ( = ) (def...) return (return ) import (from import *) 32 / 76

46 , ( ) 33 / 76

47 for (1) ( ): 1 for in range(, ): : 1 for i in range(a, b): , i = a, a + 1,..., b 1,... : range( ) range(0, ) 34 / 76

48 for (1) : 1 1 for x in range(3, 7): 2 print x * x 35 / 76

49 for (1) : 1 1 for x in range(3, 7): 2 print x * x / 76

50 for (1) : 2 1 def hatena(n): 2 a = 1 3 for i in range(0, n): 4 a = 2 * a return a 6 print hatena(5) 36 / 76

51 for (1) : 2 1 def hatena(n): 2 a = 1 3 for i in range(0, n): 4 a = 2 * a return a 6 print hatena(5) / 76

52 for (1) : 3 1 def hatena(n): 2 s = 0 3 for i in range(0, n): 4 s = s + i * i 5 return s 6 print hatena(8) (n 1) 2 s = s + i i / 76

53 for (1) : 3 1 def hatena(n): 2 s = 0 3 for i in range(0, n): 4 s = s + i * i 5 return s 6 print hatena(8) (n 1) 2 s = s + i i / 76

54 if : 1 if 1: elif: 2: else: elif. elif, else: ( ) : 1 (0) ( 1...) 2 (0) 2 ( 2...) 38 / 76

55 if (1) 1 def one_two_many(x): 2 if x == 1: 3 return ikko 4 elif x == 2: 5 return niko 6 else: 7 return takusan 8 print one_two_many(2) 9 print one_two_many(3) 39 / 76

56 if (1) 1 def one_two_many(x): 2 if x == 1: 3 return ikko 4 elif x == 2: 5 return niko 6 else: 7 return takusan 8 print one_two_many(2) 9 print one_two_many(3) 1 niko 2 takusan 39 / 76

57 if (2) 1 def nabetsune(): 2 for i in range(1, 41): 3 if i % 3 == 0 or i % 10 == 3 or 30 < i < 40: 4 print i, "!!!!!" 5 else: 6 print i 7 8 nabetsune() 40 / 76

58 if (2) 1 def nabetsune(): 2 for i in range(1, 41): 3 if i % 3 == 0 or i % 10 == 3 or 30 < i < 40: 4 print i, "!!!!!" 5 else: 6 print i 7 8 nabetsune() !!! / 76

59 ,, (e.g.,,,,,,... ),, ( ) 41 / 76

60 : 1 [,,..., ] : ( ) 42 / 76

61 : 1 from math import * 2 x = 20 3 a = [ 1, 1+2, cos(0.0), x ] 4 print a 5 print len(a) # 6 print a[2] # 7 b = a + [ 1.2, 3.4 ] # 2 8 print b 9 c = [ a, a, a ] # 10 print c[1][2] # c 1 ( ) 2 1 [1, 3, 1.0, 20] [1, 3, 1.0, 20, 1.2, 3.4] / 76

62 :,,,,,, 1 def f(l): 2 return l[0] 3 4 print f([1,2,3]) 44 / 76

63 ,, 1 a = [ 2, 3, 5 ] 2 a.append(7) # 3 a[2] = 50 4 del a[1] # a[1]. 5 b = [ a, a, a ] 6 print b 7 a[2] = 30 # 8 print b 1 [[2, 50, 7], [2, 50, 7], [2, 50, 7]] 2 [[2, 30, 7], [2, 30, 7], [2, 30, 7]] 45 / 76

64 for : 1 [ for in range(, ) ], for ( ) : ( for in ) 46 / 76

65 : 1 >>> [ x * x for x in range(0, 5) ] 2 -> [0, 1, 4, 9, 16] 1 >>> sum([ x * x for x in range(0, 5) ]) 2 -> 30 1 s = [] 2 for x in range(0, 5): 3 s.append(x * x) 1 s = [] 2 for x in range(0, 5): 3 s += x * x ( : s += E s = s + E ) 47 / 76

66 : 1,,...,, 1 (,,..., ) :!, len(...) ( )...[...] ( ) ( ) 48 / 76

67 ,,, 1 a = (1.1, 2.2, 3.3) 2 a.append(4.4) # NG 3 del a[1] # NG 4 a[1] = 22 # NG 5 a = (4.4, 5.5) # OK 6 a = a + (6.6, 7.7) # OK 2, 49 / 76

68 1 def polar(x, y): 2 r = sqrt(x * x + y * y) 3 theta = atan2(y, x) 4 return (r,theta) 1 r,theta = polor(3, 4)? OK 1 [a0,a1,a2] = range(3,6) # a0=3, a1=4, a2=5 50 / 76

69 : 1 "... " """... """ 4....? ",. a = he greeted, "hi" b = "Obama s lecture" 3 (""", ),, len(...)...[...] / 76

70 : ( ) x, 1 print x,, 1 print "x = %s" % x 1 from math import * 2 y = cos(3.14) 3 print "cos(3.14) = %s" % y 52 / 76

71 : 2 2, % 1 from math import * 2 x = print "cos(%s) = %s" % (x, exp(x)) 53 / 76

72 :, 1 1 % 2, 1, 1 i %s, 2 i %s,, %s... %d : %9d :. 9 9 %f : %.3f :., 3 54 / 76

73 (1) Python,,, (visual vector, numpy ), Python 5 55 / 76

74 (2) Python,,, (, ),,, +, len, [...] numpy Visual Python vector, 56 / 76

75 for (2) : 1 for in : ,, range(a, b),,,,, range(a, b) [ a, a + 1,...b 1 ] 57 / 76

76 for (2) : 1 for x in [ 2, 3, 5 ]: 2 print x 3 for x in "hello": 4 print x h 5 e 6 l 7 l 8 o 58 / 76

77 for (2) 1 A = [ (0,1), (2,3), (4, 5) ] 2 for x,y in A: 3 print x + y / 76

78 for (2) : zip zip(x, Y ) for 1 X = [ 1, 2, 3 ] 2 Y = [ 1, 4, 9 ] 3 for x,y in zip(x, Y): 4 print x + y / 76

79 for (2) : enumerate enumerate(l) ( ; 0, 1, 2,... ) 1 def find_space(): 2 for i,c in enumerate("hello world"): 3 if c == : 4 return i 5 return / 76

80 while : (for ) break : for, while continue : for, while ( ), Python 4 62 / 76

81 : Python,, etc. 63 / 76

82 : 1 class : : ( ), 64 / 76

83 : 1 class nothing: 2 pass # 3 4 # nothing 5 m = nothing() 6 # ( ) 7 m.x = 10 8 m.y = 20 9 # 10 print m.x + m.y 11 # def take_nothing(n): 14 n.x = n.x take_nothing(m) 17 print m.x 65 / 76

84 : init, ( ) ( self ) 1 class baseball_team: 2 # 3 def init (self, name, manager, players): 4 self.name = name 5 self.manager = manager 6 self.players = players 7 # 8 def add_player(self, p): 9 self.players.append(p) 66 / 76

85 : 1 # -> init 2 r = baseball team("nipponham", "Kuriyama", 3 [ "Inaba", "Saito", "Takeda" ]) 4 print r.players 5 # 6 r.add player("ohtani") 7 print r.players 67 / 76

86 : 1 # -> init 2 r = baseball team("nipponham", "Kuriyama", 3 [ "Inaba", "Saito", "Takeda" ]) 4 print r.players 5 # 6 r.add player("ohtani") 7 print r.players 1 [ "Inaba", "Saito", "Takeda" ] 2 [ "Inaba", "Saito", "Takeda", "Ohtani" ] 67 / 76

87 ,,, Visual Python, numpy,,, (, ) (vector, sphere, + ) 1 center = vector(2, 3, 4) 2 s = sphere(pos=center) 3 s.pos = center + vector(1, 1, 1) 68 / 76

88 add (self, o), (+) x + y, x. add (y) 1 class vector: 2 def init (self, x, y, z): 3 self.x = x 4 self.y = y 5 self.z = z 6 def add (self, o): 7 return vector(self.x + o.x, self.y + o.y, 8 self.z + o.z) 9 10 u = vector(1,2,3) 11 v = u + vector(4, 5, 6) # u. add (vector(4, 5, 6)) 12 print v, sub, mul, div 69 / 76

89 Python, +, -, *,, Python, ( ), Visual Python vector ( ), numpy array, mat,,, vector, + 70 / 76

90 Visual Python 1 from visual import * 2 s1 = sphere(color=color.red) # 3 s2 = sphere(pos=vector(1.0, 2.0, 3.0), radius=0.1) 4 # s1, s2 5 rate(0.3) # 3.3 (0.3 / ) 6 # 7 s2.color = color.green # 8 rate(0.3) # 3.3 (0.3 / ) 9 s2.pos = s2.pos * vector(-1.0,-1.0,-1.0) # Visual Python sphere, (color, radius, pos ),,, OK (, s1.vel = ) 71 / 76

91 Visual Python 1 from visual import * 2 s1 = sphere(color=color.red) # 3 s2 = sphere(pos=vector(1.0, 2.0, 3.0), radius=0.1) 4 # s1, s2 5 rate(0.3) # 3.3 (0.3 / ) 6 # 7 s2.color = color.green # 8 rate(0.3) # 3.3 (0.3 / ) 9 s2.pos = s2.pos * vector(-1.0,-1.0,-1.0) # Visual Python vector 3 +, * 72 / 76

92 Visual Python vector 1 >>> from visual import * 2 >>> v = vector(1,2,3) 3 >>> v 4 vector(1, 2, 3) 5 >>> v[0] >>> v.x >>> 2 * v 10 vector(2, 4, 6) 11 >>> v + v 12 vector(2, 4, 6) 13 >>> dir(v) 14 [..., astuple, clear, comp, cross, diff_angle, dot, mag, mag2, norm, proj, rotate, x, y, z ] 73 / 76

93 Visual Python vector 1 >>> v.mag >>> v.mag >>> v.dot(v) # >>> v.norm() 8 vector( , , ) 9 >>> v.mag * v.norm() 10 vector(1, 2, 3) 11 >>> v.cross(vector(1,1,1)) # 12 vector(-1, 2, -1) 74 / 76

94 Visual Python 1 from visual import * 2 s1 = sphere(color=color.red) # 3 s2 = sphere(pos=vector(1.0, 2.0, 3.0), radius=0.1) 4 # s1, s2 5 rate(0.3) # 3.3 (0.3 / ) 6 # 7 s2.color = color.green # 8 rate(0.3) # 3.3 (0.3 / ) 9 s2.pos = s2.pos * vector(-1.0,-1.0,-1.0) # Visual Python rate(f),, f / ( 1/f ) rate, ( ) 75 / 76

95 ( ), Python, # 1 def main(): 2 # location of the pointmass 3 p = vector(1,2,3) 4 # the pointmass 5 s = sphere(pos=p) 6 # the spring 7 sp = helix(pos=p) 8..., 1 1 #! -*- coding: utf-8 -*- 76 / 76

Python Speed Learning

Python   Speed Learning Python Speed Learning 1 / 89 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 2 / 89 Contents 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 3 / 89 (def) (for) (if) etc. 1 4 / 89 Jupyter

More information

1 ( : Documents/kadai4), (ex.py ),. print 12345679 * 63, cd Documents/kadai4, python ex.py., python: can t open file ex.py : [Errno 2] No such file or

1 ( : Documents/kadai4), (ex.py ),. print 12345679 * 63, cd Documents/kadai4, python ex.py., python: can t open file ex.py : [Errno 2] No such file or Python 2010.6 1 Python 1.1 ( ). mi.,.py. 1.2, python.. 1. python, python. ( ). 2.., python. Python (>>>). Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type help, copyright,

More information

Visual Python, Numpy, Matplotlib

Visual Python, Numpy, Matplotlib Visual Python, Numpy, Matplotlib 1 / 38 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 2 / 38 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 3 / 38 3 Visual Python: 3D Numpy,

More information

Visual Python, Numpy, Matplotlib

Visual Python, Numpy, Matplotlib Visual Python, Numpy, Matplotlib 1 / 57 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 2 / 57 Contents 1 2 Visual Python 3 Numpy Scipy 4 Scipy 5 Matplotlib 3 / 57 3 Visual Python: 3D Numpy,

More information

listings-ext

listings-ext (6) Python (2) ( ) ohsaki@kwansei.ac.jp 5 Python (2) 1 5.1 (statement)........................... 1 5.2 (scope)......................... 11 5.3 (subroutine).................... 14 5 Python (2) Python 5.1

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション アルゴリズム設計 5 月 18 日 Agenda 諸注意 Pythonの心得 エラー処理 クラス 諸注意 諸注意 提出前に必ず実行してください! エラーがある場合はコメントアウト等, 実行されないように 関数名指定にも関わらず, 自分で関数名を決めている どの問題なのか分からなくなるので, 決められた名前を使ってください 関数をクォーテーションで囲んでいる 定義しただけでは実行されないので, クォーテーションで囲む意味はありません.

More information

PowerPoint Presentation

PowerPoint Presentation 知能システム論 1 (3) 2009.4.21 情報システム学研究科情報メディアシステム学専攻知能システム学講座末廣尚士 - 講義資料の HP http://www.taka.is.uec.ac.jp/ から右のメニューの class をクリック または http://www.taka.is.uec.ac.jp/class200 9/class2009.html を直接入力 2. Python 入門

More information

永和システムマネジメント SP 安井力 東京支社 Python 勉強会実習資料 2005/12/28 この資料の使い方最初から順に試してください 初心者は 書かれたとおり入力して ほかにも似た例を試してみてください 初級者は 書かれたとおり入力して なぜそれで動くのか調べてください 中級者は 設問か

永和システムマネジメント SP 安井力 東京支社 Python 勉強会実習資料 2005/12/28 この資料の使い方最初から順に試してください 初心者は 書かれたとおり入力して ほかにも似た例を試してみてください 初級者は 書かれたとおり入力して なぜそれで動くのか調べてください 中級者は 設問か この資料の使い方最初から順に試してください 初心者は 書かれたとおり入力して ほかにも似た例を試してみてください 初級者は 書かれたとおり入力して なぜそれで動くのか調べてください 中級者は 設問から解答を考えてください 根性 問題も挑戦してください 上級者は 根性 問題も含めて この資料の改善をしてください 根性 問題は やる気と ( 多少の ) 知識がある人に挑戦して欲しいものです 1. 起動と実行

More information

RHEA key

RHEA key 2 P (k, )= k e k! 3 4 Probability 0.4 0.35 0.3 0.25 Poisson ( λ = 1) Poisson (λ = 3) Poisson ( λ = 10) Poisson (λ = 20) Poisson ( λ = 30) Gaussian (µ = 1, s = 1) Gaussian ( µ = 3, s = 3) Gaussian (µ =

More information

num2.dvi

num2.dvi kanenko@mbk.nifty.com http://kanenko.a.la9.jp/ 16 32...... h 0 h = ε () 0 ( ) 0 1 IEEE754 (ieee754.c Kerosoft Ltd.!) 1 2 : OS! : WindowsXP ( ) : X Window xcalc.. (,.) C double 10,??? 3 :, ( ) : BASIC,

More information

1 VisBAR edu H 2 O.....

1 VisBAR edu H 2 O..... VisBAR edu v1.03 ( ) 25 4 22 1 VisBAR edu 1 1.1....................................................... 1 1.2.................................................. 2 2 3 2.1 H 2 O.........................................

More information

PYTHON 資料 電脳梁山泊烏賊塾 PYTHON 入門 ゲームプログラミング スプライトの衝突判定 スプライトの衝突判定 スプライトの衝突判定の例として インベーダーゲームのコードを 下記に示す PYTHON3 #coding: utf-8 import pygame from pygame.lo

PYTHON 資料 電脳梁山泊烏賊塾 PYTHON 入門 ゲームプログラミング スプライトの衝突判定 スプライトの衝突判定 スプライトの衝突判定の例として インベーダーゲームのコードを 下記に示す PYTHON3 #coding: utf-8 import pygame from pygame.lo PYTHON 入門 ゲームプログラミング スプライトの衝突判定 スプライトの衝突判定 スプライトの衝突判定の例として インベーダーゲームのコードを 下記に示す #coding: utf-8 import pygame from pygame.locals import * import os import sys SCR_RECT = Rect(0, 0, 640, 480) def main():

More information

2015 I ( TA)

2015 I ( TA) 2015 I ( TA) Schrödinger PDE Python u(t, x) x t 2 u(x, t) = k u(t, x) t x2 k k = i h 2m Schrödinger h m 1 ψ(x, t) i h ( 1 ψ(x, t) = i h ) 2 ψ(x, t) t 2m x Cauchy x : x Fourier x x Fourier 2 u(x, t) = k

More information

Python @HACHINONE 10 1 V Python 2014 2 : L[i] # -*- coding: utf-8 -*- def search(l, e): """L をリスト e をオブジェクトとする L に e が含まれていれば True そうでなければ False を返す """ for i in range(len(l)): if L[i] == e: return True

More information

haskell.gby

haskell.gby Haskell 1 2 3 Haskell ( ) 4 Haskell Lisper 5 Haskell = Haskell 6 Haskell Haskell... 7 qsort [8,2,5,1] [1,2,5,8] "Hello, " ++ "world!" "Hello, world!" 1 + 2 div 8 2 (+) 1 2 8 div 2 3 4 map even [1,2,3,4]

More information

RL_tutorial

RL_tutorial )! " = $ % & ' "(& &*+ = ' " + %' "(- + %. ' "(. + γ γ=0! " = $ " γ=0.9! " = $ " + 0.9$ " + 0.81$ "+, + ! " #, % #! " #, % # + (( + #,- +. max 2 3! " #,-, % 4! " #, % # ) α ! " #, % ' ( )(#, %)!

More information

cards.gif from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height = 300) c0.pack() image_data = PhotoImage(file = c1.gif ) c0.create_i

cards.gif from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height = 300) c0.pack() image_data = PhotoImage(file = c1.gif ) c0.create_i (Python ) Python Python 2 1. 2 2. 52 3. A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2 4. 13 5. 6. 7. 8. 9. 13 10. 11. 12. Python http://www.jftz.com/cards/ 1 cards.gif from Tkinter import * root = Tk() c0 = Canvas(root,

More information

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1:

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1: 005 9 7 1 1.1 1 Hello World!! 5 p r i n t f ( H e l l o World!! \ n ) ; 7 return 0 ; 8 } 1: 1 [ ] Hello World!! from Akita National College of Technology. 1 : 5 p r i n t f ( H e l l o World!! \ n ) ;

More information

Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo if 11 for 11 range 12 break continue 13 pass

Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo if 11 for 11 range 12 break continue 13 pass Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo 6 6 7 9 10 11 if 11 for 11 range 12 break continue 13 pass 13 13 14 15 15 23 23 24 24 24 25 import 26 27-1- Boo Boo Python CLI.NET

More information

from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height = 300) c0.pack() image_data = PhotoImage(file = c1.gif ) c0.create_image(200,

from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height = 300) c0.pack() image_data = PhotoImage(file = c1.gif ) c0.create_image(200, (Python ) Python Python 2 1. 2 2. 52 3. A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2 4. 13 5. 6. 7. 8. 9. 13 10. 11. 12. Python.gif 1 from Tkinter import * root = Tk() c0 = Canvas(root, width = 400, height =

More information

Windows (L): D:\jyugyou\ D:\jyugyou\ D:\jyugyou\ (N): en2 OK 2

Windows (L): D:\jyugyou\ D:\jyugyou\ D:\jyugyou\ (N): en2 OK 2 Windows C++ Microsoft Visual Studio 2010 C++ Microsoft C++ Microsoft Visual Studio 2010 Microsoft Visual Studio 2010 C++ C C++ Microsoft Visual Studio 2010 Professional Professional 1 Professional Professional

More information

listings-ext

listings-ext (10) (2) ( ) ohsaki@kwansei.ac.jp 8 (2) 1 8.1.............................. 1 8.2 mobility.fixed.......................... 2 8.3 mobility.randomwalk...................... 7 8.4 mobility.randomwaypoint...................

More information

Python C/C++ IPMU IRAF

Python C/C++ IPMU IRAF Python C/C++ IPMU 2010 11 24IRAF Python Swig Numpy array Image Python 2.6.6 swig 1.3.40 numpy 1.5.0 pyfits 2.3 pyds9 1.1 svn co hjp://svn.scipy.org/svn/numpy/tags/1.5.0/doc/swig swig/numpy.i /usr/local/share/swig/1.3.40/python

More information

nakao

nakao Fortran+Python 4 Fortran, 2018 12 12 !2 Python!3 Python 2018 IEEE spectrum https://spectrum.ieee.org/static/interactive-the-top-programming-languages-2018!4 Python print("hello World!") if x == 10: print

More information

all.dvi

all.dvi fortran 1996 4 18 2007 6 11 2012 11 12 1 3 1.1..................................... 3 1.2.............................. 3 2 fortran I 5 2.1 write................................ 5 2.2.................................

More information

コンピュータ概論

コンピュータ概論 4.1 For Check Point 1. For 2. 4.1.1 For (For) For = To Step (Next) 4.1.1 Next 4.1.1 4.1.2 1 i 10 For Next Cells(i,1) Cells(1, 1) Cells(2, 1) Cells(10, 1) 4.1.2 50 1. 2 1 10 3. 0 360 10 sin() 4.1.2 For

More information

1 matplotlib matplotlib Python matplotlib numpy matplotlib Installing A 2 pyplot matplotlib 1 matplotlib.pyplot matplotlib.pyplot plt import import nu

1 matplotlib matplotlib Python matplotlib numpy matplotlib Installing A 2 pyplot matplotlib 1 matplotlib.pyplot matplotlib.pyplot plt import import nu Python Matplotlib 2016 ver.0.06 matplotlib python 2 3 (ffmpeg ) Excel matplotlib matplotlib doc PDF 2,800 python matplotlib matplotlib matplotlib Gallery Matplotlib Examples 1 matplotlib 2 2 pyplot 2 2.1

More information

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental data structures /06/14(Tue) / Memory Management

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental data structures /06/14(Tue) / Memory Management I117 II I117 PROGRAMMING PRACTICE II OTHER LANGUAGES Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming

More information

from tkinter import * root = Tk() # variable teban = IntVar() teban.set(1) # def start(): canvas.create_rectangle(0, 0, 560, 560, fill= white ) for k

from tkinter import * root = Tk() # variable teban = IntVar() teban.set(1) # def start(): canvas.create_rectangle(0, 0, 560, 560, fill= white ) for k Zen Deep Zen Go from tkinter import * root = Tk() canvas = Canvas(root, width = 360, height=360) canvas.pack() root.mainloop() 1 from tkinter import * root = Tk() # variable teban = IntVar() teban.set(1)

More information

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 (Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 17 Fortran Formular Tranlator Lapack Fortran FORTRAN, FORTRAN66, FORTRAN77, FORTRAN90, FORTRAN95 17.1 A Z ( ) 0 9, _, =, +, -, *,

More information

Copyright c 2006 Zhenjiang Hu, All Right Reserved.

Copyright c 2006 Zhenjiang Hu, All Right Reserved. 1 2006 Copyright c 2006 Zhenjiang Hu, All Right Reserved. 2 ( ) 3 (T 1, T 2 ) T 1 T 2 (17.3, 3) :: (Float, Int) (3, 6) :: (Int, Int) (True, (+)) :: (Bool, Int Int Int) 4 (, ) (, ) :: a b (a, b) (,) x y

More information

Windows [ ] [ (R)..] cmd [OK] Z:\> mkdir progi [Enter] \ ) mkdir progi ) (command ) help [Enter] help ( help ) mkdir make directory Windows ) mkdir mk

Windows [ ] [ (R)..] cmd [OK] Z:\> mkdir progi [Enter] \ ) mkdir progi ) (command ) help [Enter] help ( help ) mkdir make directory Windows ) mkdir mk Ruby I I 1 Windows 1 Meadow 1: Meadow I Meadow 2 2 Ruby 2.1 I Z progi 1 Windows [ ] [ (R)..] cmd [OK] Z:\> mkdir progi [Enter] \ ) mkdir progi ) (command ) help [Enter] help ( help ) mkdir make directory

More information

Java updated

Java updated Java 2003.07.14 updated 3 1 Java 5 1.1 Java................................. 5 1.2 Java..................................... 5 1.3 Java................................ 6 1.3.1 Java.......................

More information

( ) ( ) lex LL(1) LL(1)

( ) ( ) lex LL(1) LL(1) () () lex LL(1) LL(1) http://www.cs.info.mie-u.ac.jp/~toshi/lectures/compiler/ 29 5 14 1 1 () / (front end) (back end) (phase) (pass) 1 2 1 () () var left, right; fun int main() { left = 0; right = 10;

More information

Parametric Polymorphism

Parametric Polymorphism ML 2 2011/04/19 Parametric Polymorphism Type Polymorphism ? : val hd_int : int list - > int val hd_bool : bool list - > bool val hd_i_x_b : (int * bool) list - > int * bool etc. let hd_int = function (x

More information

or a 3-1a (0 b ) : max: a b a > b result a result b ( ) result Python : def max(a, b): if a > b: result = a else: result = b ret

or a 3-1a (0 b ) : max: a b a > b result a result b ( ) result Python : def max(a, b): if a > b: result = a else: result = b ret 4 2018.10.18 or 1 1.1 3-1a 3-1a (0 b ) : max: a b a > b result a result b result Python : def max(a, b): if a > b: result = a result = b return(result) : max2: a b result a b > result result b result 1

More information

Java演習(4) -- 変数と型 --

Java演習(4)   -- 変数と型 -- 50 20 20 5 (20, 20) O 50 100 150 200 250 300 350 x (reserved 50 100 y 50 20 20 5 (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics; (reserved public class Blocks1 extends

More information

スライド 1

スライド 1 (10-1) 2019.6.19 電気通信大学大学院情報理工学研究科末廣尚士 16. ロボットアーム RTC - 6 自由度ロボットアーム 6 回転関節シリアルリンク 2 - ロボットアーム RTC 入力 目標関節角度 :target_joints TimedDoubleSeq 型 ( 長さ 6), 単位はラジアン ハンドの開き幅 :h_width TimedDouble 型単位はメートル 出力 実際の関節角度

More information

Microsoft PowerPoint _watanabe.pptx

Microsoft PowerPoint _watanabe.pptx - 双曲幾何ツールの試作に向けて - 2011 年 12 月 20 日 筑波大学システム情報系 渡辺 俊 地理情報科学と都市工学を融合した空間解析手法の新展開 Page 1 活動の概要 仮想空間 実空間の一体化 AR 技術を利用した実空間 GIS の開発 3 次元都市モデルの整備 SketchUp の活用 e-learning コンテンツの更新 ArcGIS10 Python への対応 アルゴリズム教材の開発

More information

1 6/13 2 6/20 3 6/27 4 7/4 5 7/11 6 7/18 N 7 7/25 Warshall-Floyd, Bellman-Ford, Dijkstra TSP DP, 8/1 2 / 36

1 6/13 2 6/20 3 6/27 4 7/4 5 7/11 6 7/18 N 7 7/25 Warshall-Floyd, Bellman-Ford, Dijkstra TSP DP, 8/1 2 / 36 3 2016 6 27 1 / 36 1 6/13 2 6/20 3 6/27 4 7/4 5 7/11 6 7/18 N 7 7/25 Warshall-Floyd, Bellman-Ford, Dijkstra TSP DP, 8/1 2 / 36 1 2 3 3 / 36 4 / 36 os.urandom(n) n >>> import os >>> r = os.urandom(4) #

More information

: Shift-Return evaluate 2.3 Sage? Shift-Return abs 2 abs? 2: abs 3: fac

: Shift-Return evaluate 2.3 Sage? Shift-Return abs 2 abs? 2: abs 3: fac Bulletin of JSSAC(2012) Vol. 18, No. 2, pp. 161-171 : Sage 1 Sage Mathematica Sage (William Stein) 2005 2 2006 2 UCSD Sage Days 1 Sage 1.0 4.7.2 1) Sage Maxima, R 2 Sage Firefox Internet Explorer Sage

More information

Python (Anaconda ) Anaconda 2 3 Python Python IDLE Python NumPy 6

Python (Anaconda ) Anaconda 2 3 Python Python IDLE Python NumPy 6 Python (Anaconda ) 2017. 05. 30. 1 1 2 Anaconda 2 3 Python 3 3.1 Python.......................... 3 3.2 IDLE Python....................... 5 4 NumPy 6 5 matplotlib 7 5.1..................................

More information

Python3 Next 2

Python3 Next 2 Python Python Tkinter Tkinter Python Python Anaconda Python Anaconda Python https://www.continuum.io/downloads Python 3.6 version Python2 Python3 Python 2.7 Python 3.6 Python2 1 Python3 Next 2 I Agree

More information

スライド 1

スライド 1 (11-2) 2019.6.26 電気通信大学大学院情報理工学研究科末廣尚士 - 手先の軌道生成 ( 再掲 ) その都度, 逆運動学計算をするとは少し手間がかかる. 本当に必要か? 分割が小さければ, ニュートン ラフソン法で 収束 させる必要はないかもしれない. 2 - 直線軌道で分割する ( 再掲 ) 3 - 関節角の微少量をもとめる ( 再掲 ) 4 - 分解運動 ( 速度 ) 制御 ( 再掲

More information

Agenda Motivation How it works Performance Limitation Conclusion

Agenda Motivation How it works Performance Limitation Conclusion py2llvm: Python to LLVM translator Syoyo Fujita Agenda Motivation How it works Performance Limitation Conclusion Agenda Motivation How it works Performance Limitation Conclusion py2llvm Python LLVM Python,

More information

() / (front end) (back end) (phase) (pass) 1 2

() / (front end) (back end) (phase) (pass) 1 2 1 () () lex http://www.cs.info.mie-u.ac.jp/~toshi/lectures/compiler/ 2018 4 1 () / (front end) (back end) (phase) (pass) 1 2 () () var left, right; fun int main() { left = 0; right = 10; return ((left

More information

untitled

untitled 1 2 1 1 2 3 1 2 1 2 4 0,76 4 5 0,1 1970 1974 1993 6 7 8 9 4 1920 10 1960 1971 ( ) IC 11 1980 1990 1992 1987 0,269 1996 0,023 2001 2002 1996 1996 1 98 27 70 1 3 7 12 2003 63 2 13 3 5 1 13 5 14 2 14 2 14

More information

ohp08.dvi

ohp08.dvi 19 8 ( ) 2019.4.20 1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: 2 (2) NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( 2) 3 (3) head cur tail head cur prev data

More information

Ruby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=>

Ruby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=> Ruby Ruby 200779 ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( 2+3+4+5+6+7+8+9 ) 44 irb(main):002:0> irb irb(main):001:0> 1+2+3+4 => 10 irb(main):002:0>

More information

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2 September 2016 1 Windows Cygwin Mac *1 Emacs Ruby 1 1.1 ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2 ~/16:00:20> ls 2 2 ls ls -a ~/16:00:20> ls -a

More information

:56 1 (Forward kinematics) (Global frame) G r = (X, Y, Z) (Local frame) L r = (x, y, z) 1 X Y, Z X Y, Z 1 ( ) ( ) 1.2 (Joint rotati

:56 1 (Forward kinematics) (Global frame) G r = (X, Y, Z) (Local frame) L r = (x, y, z) 1 X Y, Z X Y, Z 1 ( ) ( ) 1.2 (Joint rotati 2013.09.21 17:56 1 (Forward kinematics) 1.1 2 (Global frame) G r (X, Y, Z) (Local frame) L r (x, y, z) 1 X Y, Z X Y, Z 1 ( ) ( ) 1.2 (Joint rotation) 3 P G r, L r G r L r Z α : G r Q L Z,α r (1) 1 G r

More information

OpenCV IS Report No Report Medical Information System Labratry

OpenCV IS Report No Report Medical Information System Labratry OpenCV 2014 8 25 IS Report No. 2014090201 Report Medical Information System Labratry Abstract OpenCV OpenCV 1............................ 2 1.1 OpenCV.......................... 2 1.2......................

More information

2012 IA 8 I p.3, 2 p.19, 3 p.19, 4 p.22, 5 p.27, 6 p.27, 7 p

2012 IA 8 I p.3, 2 p.19, 3 p.19, 4 p.22, 5 p.27, 6 p.27, 7 p 2012 IA 8 I 1 10 10 29 1. [0, 1] n x = 1 (n = 1, 2, 3,...) 2 f(x) = n 0 [0, 1] 2. 1 x = 1 (n = 1, 2, 3,...) 2 f(x) = n 0 [0, 1] 1 0 f(x)dx 3. < b < c [, c] b [, c] 4. [, b] f(x) 1 f(x) 1 f(x) [, b] 5.

More information

1-4 int a; std::cin >> a; std::cout << "a = " << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >>

1-4 int a; std::cin >> a; std::cout << a =  << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >> 1 C++ 1.1 C C++ C++ C C C++ 1.1.1 C printf() scanf() C++ C hello world printf() 1-1 #include printf( "hello world\n" ); C++ 1-2 std::cout

More information

untitled

untitled II yacc 005 : 1, 1 1 1 %{ int lineno=0; 3 int wordno=0; 4 int charno=0; 5 6 %} 7 8 %% 9 [ \t]+ { charno+=strlen(yytext); } 10 "\n" { lineno++; charno++; } 11 [^ \t\n]+ { wordno++; charno+=strlen(yytext);}

More information

超初心者用

超初心者用 3 1999 10 13 1. 2. hello.c printf( Hello, world! n ); cc hello.c a.out./a.out Hello, world printf( Hello, world! n ); 2 Hello, world printf n printf 3. ( ) int num; num = 100; num 100 100 num int num num

More information

# let rec sigma (f, n) = # if n = 0 then 0 else f n + sigma (f, n-1);; val sigma : (int -> int) * int -> int = <fun> sigma f n ( : * -> * ) sqsum cbsu

# let rec sigma (f, n) = # if n = 0 then 0 else f n + sigma (f, n-1);; val sigma : (int -> int) * int -> int = <fun> sigma f n ( : * -> * ) sqsum cbsu II 4 : 2001 11 7 keywords: 1 OCaml OCaml (first-class value) (higher-order function) 1.1 1 2 + 2 2 + + n 2 sqsum 1 3 + 2 3 + + n 3 cbsum # let rec sqsum n = # if n = 0 then 0 else n * n + sqsum (n - 1)

More information

Python2 Python3 Python 2.7 Python 3.6 Python2 Python3 Python 2.7 Python3.6 Python Python Anaconda Python Anaconda Python

Python2 Python3 Python 2.7 Python 3.6 Python2 Python3 Python 2.7 Python3.6 Python Python Anaconda Python Anaconda Python (Python ) C++ Python Python 1 Python2 Python3 Python 2.7 Python 3.6 Python2 Python3 Python 2.7 Python3.6 Python Python Anaconda Python Anaconda Python https://www.continuum.io/downloads 2 Python 3.6 version

More information

復習 プログラミング 1 ( 第 4 回 ) 関数の利用 2 ループ処理 (while 文 ) 1. Chapter の補足 2 1. 関数とローカル変数 2. Chapter 3.1 の補足 1. Iteration, looping ( 反復処理 ) 2. ループ処理の例 実行例 3

復習 プログラミング 1 ( 第 4 回 ) 関数の利用 2 ループ処理 (while 文 ) 1. Chapter の補足 2 1. 関数とローカル変数 2. Chapter 3.1 の補足 1. Iteration, looping ( 反復処理 ) 2. ループ処理の例 実行例 3 復習 プログラミング 1 ( 第 4 回 ) 関数の利用 2 ループ処理 (while 文 ) 1. Chapter 4.1.1 の補足 2 1. 関数とローカル変数 2. Chapter 3.1 の補足 1. Iteration, looping ( 反復処理 ) 2. ループ処理の例 実行例 3. 3 種類の処理流れ制御 3. 演習 4. 宿題 処理の流れは逐次 条件分岐 反復処理の 3 タイプのみ

More information

r08.dvi

r08.dvi 19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev

More information

離散数理工学 第 2回 数え上げの基礎:漸化式の立て方

離散数理工学 第 2回  数え上げの基礎:漸化式の立て方 2 okamotoy@uec.ac.jp 2015 10 20 2015 10 18 15:29 ( ) (2) 2015 10 20 1 / 45 ( ) 1 (10/6) ( ) (10/13) 2 (10/20) 3 ( ) (10/27) (11/3) 4 ( ) (11/10) 5 (11/17) 6 (11/24) 7 (12/1) 8 (12/8) ( ) (2) 2015 10 20

More information

たのしいプログラミング Pythonではじめよう!

たのしいプログラミング Pythonではじめよう! Title of English-language original: Python for Kids A Playful Introduction to Programming ISBN 978-1-59327-407-8, published by No Starch Press, Inc. Copyright 2013 by Jason R. Briggs. Japanese-language

More information

Microsoft PowerPoint - CproNt02.ppt [互換モード]

Microsoft PowerPoint - CproNt02.ppt [互換モード] 第 2 章 C プログラムの書き方 CPro:02-01 概要 C プログラムの構成要素は関数 ( プログラム = 関数の集まり ) 関数は, ヘッダと本体からなる 使用する関数は, プログラムの先頭 ( 厳密には, 使用場所より前 ) で型宣言 ( プロトタイプ宣言 ) する 関数は仮引数を用いることができる ( なくてもよい ) 関数には戻り値がある ( なくてもよい void 型 ) コメント

More information

Jacques Garrigue

Jacques Garrigue Jacques Garrigue Garrigue 1 Garrigue 2 $ print_lines () > for i in $1; do > echo $i > done $ print_lines "a b c" a b c Garrigue 3 Emacs Lisp (defun print-lines (lines) (dolist (str lines) (insert str)

More information

I J

I J I 065763J 8 7 7 31 jikken/ +----- accumulation_demupa.c +----- accumulation_rain.c +----- frequency_demupa.c +----- frequency_rain.c +----- go.sh +----- graph_maker.sh +----- mesure-ryudai/ 2007/4/1 2007/6/30

More information

ML Edinburgh LCF ML Curry-Howard ML ( ) ( ) ( ) ( ) 1

ML Edinburgh LCF ML Curry-Howard ML ( ) ( ) ( ) ( ) 1 More Logic More Types ML/OCaml GADT Jacques Garrigue ( ) Jacques Le Normand (Google) Didier Rémy (INRIA) @garriguejej ocamlgadt ML Edinburgh LCF ML Curry-Howard ML ( ) ( ) ( ) ( ) 1 ( ) ML type nebou and

More information

1/8 ページ Java 基礎文法最速マスター Java Javaの文法一覧です 他の言語をある程度知っている人はこれを読めばJavaの基礎をマスターしてJavaを書くことができるようになっています 簡易リファレンスとしても利用できると思いますので これは足りないと思うものがあれば教えてください 1. 基礎 class の作成プログラムはclassに記述します たとえばSampleという名前のclassを作る場合

More information

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます.   このサンプルページの内容は, 初版 1 刷発行時のものです. Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/009631 このサンプルページの内容は, 初版 1 刷発行時のものです. Excel URL http://www.morikita.co.jp/books/mid/009631 i Microsoft Windows

More information

PYTHON 資料 電脳梁山泊烏賊塾 PYTHON 入門 関数とメソッド 関数とメソッド Python には関数 (function) とメソッド (method) が有る モジュール内に def で定義されて居る物が関数 クラス内に def で定義されて居る物がメソッドに成る ( 正確にはクラスが

PYTHON 資料 電脳梁山泊烏賊塾 PYTHON 入門 関数とメソッド 関数とメソッド Python には関数 (function) とメソッド (method) が有る モジュール内に def で定義されて居る物が関数 クラス内に def で定義されて居る物がメソッドに成る ( 正確にはクラスが PYTHON 入門 関数とメソッド 関数とメソッド Python には関数 (function) とメソッド (method) が有る モジュール内に def で定義されて居る物が関数 クラス内に def で定義されて居る物がメソッドに成る ( 正確にはクラスがインスタンス化されてからメソッドに成る ) # 関数 def test_func(): print('call test_func') #

More information

スライド 1

スライド 1 ( 補 1) 2018.4.18 電気通信大学大学院情報理工学研究科末廣尚士 補足 1. オブジェクト指向プログラミング プログラムを オブジェクト を中心に考える. 特徴 抽象化クラス, インスタンスの関係実装の隠ぺい カプセル化データと処理関数の一体化内部変数, 内部関数の隠ぺい 階層構造クラスの継承 多様性, 多態性関数, 演算子の上書き ( オーバーライド ), 多重化 ( オーバーロード

More information

,,,,., C Java,,.,,.,., ,,.,, i

,,,,., C Java,,.,,.,., ,,.,, i 24 Development of the programming s learning tool for children be derived from maze 1130353 2013 3 1 ,,,,., C Java,,.,,.,., 1 6 1 2.,,.,, i Abstract Development of the programming s learning tool for children

More information

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225 Java Java Java Java Java 4 p35 4-2 * *** ***** *** * Unix p36 4-3 a,b,c,d 100,200,250,500 a*b = 20000 a*b+c = 20250 a*b+c*d = 145000 (a+b)*(c+d) = 225000 a+b*c+d = 50600 b/a+d/c = 4 p38 4-4 (1) mul = 1

More information

1.ppt

1.ppt /* * Program name: hello.c */ #include int main() { printf( hello, world\n ); return 0; /* * Program name: Hello.java */ import java.io.*; class Hello { public static void main(string[] arg)

More information

K227 Java 2

K227 Java 2 1 K227 Java 2 3 4 5 6 Java 7 class Sample1 { public static void main (String args[]) { System.out.println( Java! ); } } 8 > javac Sample1.java 9 10 > java Sample1 Java 11 12 13 http://java.sun.com/j2se/1.5.0/ja/download.html

More information

EnSight 10.1の新機能

EnSight 10.1の新機能 EnSight の処理の自動化のためのテクニックのご紹介 CEI ソフトウェア株式会社 松野康幸 2016 年 11 月 4 日 本日の予定 EnSight の処理の自動化に向けて EnSight のコマンドでできること EnSight で利用できるコマンドの種類 コマンド ファイルの作り方 Python 形式のコマンドの作り方作成したコマンド ファイルの実行方法ユーザー定義ツールの作り方ユーザー定義ツールの使い方

More information

導入基礎演習.ppt

導入基礎演習.ppt Multi-paradigm Programming Functional Programming Scheme Haskell ML Scala X10 KL1 Prolog Declarative Lang. C Procedural Lang. Java C++ Python Object-oriented Programming / (root) bin home lib 08 09

More information

piyo0704a.rtfd

piyo0704a.rtfd す ここで中核となるのは 組み込み関数 eval および compile です 1 コードを実行するだけなら Python/Jython で記述したコードを実行するためのツール作りに着手します >>> compile("3+4", "(*.*", "eval" >>> eval(compile("3+4",

More information

プログラミング 1 ( 第 5 回 ) ループ処理 (for 文 ) range() 関数とリストによるシーケンス集合表現 1. Chapter 3.2 For Loops 1. もう一つのループ処理 2. シーケンス集合とコード例 2. Chapter 3.4 A Few Words About

プログラミング 1 ( 第 5 回 ) ループ処理 (for 文 ) range() 関数とリストによるシーケンス集合表現 1. Chapter 3.2 For Loops 1. もう一つのループ処理 2. シーケンス集合とコード例 2. Chapter 3.4 A Few Words About プログラミング 1 ( 第 5 回 ) ループ処理 (for 文 ) range() 関数とリストによるシーケンス集合表現 1. Chapter 3.2 For Loops 1. もう一つのループ処理 2. シーケンス集合とコード例 2. Chapter 3.4 A Few Words About Using Floats 1. 浮動小数点数の取り扱い 3. 演習 1. 演習 1 4: 初めてのレポート

More information

離散数理工学 第 2回 数え上げの基礎:漸化式の立て方

離散数理工学 第 2回  数え上げの基礎:漸化式の立て方 2 okamotoy@uec.ac.jp 2014 10 21 2014 10 29 10:48 ( ) (2) 2014 10 21 1 / 44 ( ) 1 (10/7) ( ) (10/14) 2 (10/21) 3 ( ) (10/28) 4 ( ) (11/4) 5 (11/11) 6 (11/18) 7 (11/25) ( ) (2) 2014 10 21 2 / 44 ( ) 8 (12/2)

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double

More information

1st-session key

1st-session key 1 2013/11/29 Project based Learning: Soccer Agent Program 1 2012/12/9 Project based Learning: Soccer Agent Program PBL Learning by doing Schedule 1,2 2013 11/29 Make 2013 12/6 2013 12/13 2013 12/20 2014

More information

コメント プログラム中には コメントを加える事ができます 処理の際には無視されるので 注釈や覚え書きとして利 できます print("hello Sapporo!") # Hello Sapporo! と 表 する # コメントは無視される 字列 字列とは 単語や 章のような 字の連なったものです

コメント プログラム中には コメントを加える事ができます 処理の際には無視されるので 注釈や覚え書きとして利 できます print(hello Sapporo!) # Hello Sapporo! と 表 する # コメントは無視される 字列 字列とは 単語や 章のような 字の連なったものです CHaser のための Python 基礎編 これは U-16 札幌プロコン事前講習会に向けて メンター向けに Python の基礎を すドキュメントです 意するもの 基本編 PC Windows パソコンで CHaser を動かすまで で 意した USB メモリ Python プログラムの実 法は 主に 2 通りあります 対話型シェルによる実 対話型シェルとは その名の通り 対話をしているように

More information

r1.dvi

r1.dvi Ruby 2009.9.7 1 ( ) --- ( ( ) ( ) 1 --- ( ) 1 ( ) (?) IT 7K( )?? ( ) ( )? IT ( ) --- ( ) 1 ( ) --- ( ) (?) 2-3% Top-Level ICT Professional 5% ICT Professional 10% 100% 50% 20% Devl. Experiment Adv. ICT

More information

3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println("Hello World");

3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println(Hello World); (Basic Theory of Information Processing) Java (eclipse ) Hello World! eclipse Java 1 3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println("Hello

More information

‘îŁñ›È−wfiÁŁÊ”À„±I --Tensorflow‡ð”g‡Á‡½fl»ŁÊ›ð’Í--

‘îŁñ›È−wfiÁŁÊ”À„±I  --Tensorflow‡ð”g‡Á‡½fl»ŁÊ›ð’Í-- I Tensorflow 2018 10 31 ( ) ( ) Tensorflow 2018 10 31 ( ) 1 / 39 Tensorflow I Tensorflow Python Python(+Python Anaconda) Tensorflow Tensorflow 1 Anaconda Prompt 2 Anaconda Prompt (base) C:\Users\komori>conda

More information

fp.gby

fp.gby 1 1 2 2 3 2 4 5 6 7 8 9 10 11 Haskell 12 13 Haskell 14 15 ( ) 16 ) 30 17 static 18 (IORef) 19 20 OK NG 21 Haskell (+) :: Num a => a -> a -> a sort :: Ord a => [a] -> [a] delete :: Eq a => a -> [a] -> [a]

More information

Informatics 2010.key

Informatics 2010.key http://math.sci.hiroshima-u.ac.jp/ ~ryo/lectures/informatics2010/ 1 2 C ATM etc. etc. (Personal Computer) 3 4 Input Output Device Central Processing Unit I/O CPU Memory 5 6 (CPU),,... etc. C, Java, Fortran...

More information

Python ( ) Anaconda 2 3 Python Python IDLE Python NumPy 6 5 matpl

Python ( ) Anaconda 2 3 Python Python IDLE Python NumPy 6 5 matpl Python ( ) 2017. 11. 21. 1 1 2 Anaconda 2 3 Python 3 3.1 Python.......................... 3 3.2 IDLE Python....................... 5 4 NumPy 6 5 matplotlib 7 5.1.................................. 7 5.2..................................

More information

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B A/B (2018/10/19) Ver. 1.0 kurino@math.cst.nihon-u.ac.jp http://edu-gw2.math.cst.nihon-u.ac.jp/ kurino/2018/soft/soft.html 2018 10 19 A/B 1 2018 10 19 2 1 1 1.1 OHP.................................... 1

More information

B演習(言語処理系演習)第一回

B演習(言語処理系演習)第一回 B 演習 ( 言語処理系演習 ) 第 3 回 字句解析 田浦 今日の予定 字句解析インタフェース 今週の課題 字句の定義 字句解析器の仕組み ( 概要 ) 下請け部品 char_buf, char_stream, int_stack まめ知識 : デバッガ デバッグに関する若干の抽象論 字句解析器とは ) 字句解析器 (tokenizer) d e f f i b ( n ) : ( Identifier

More information

N88 BASIC 0.3 C: My Documents 0.6: 0.3: (R) (G) : enterreturn : (F) BA- SIC.bas 0.8: (V) 0.9: 0.5:

N88 BASIC 0.3 C: My Documents 0.6: 0.3: (R) (G) : enterreturn : (F) BA- SIC.bas 0.8: (V) 0.9: 0.5: BASIC 20 4 10 0 N88 Basic 1 0.0 N88 Basic..................................... 1 0.1............................................... 3 1 4 2 5 3 6 4 7 5 10 6 13 7 14 0 N88 Basic 0.0 N88 Basic 0.1: N88Basic

More information

3360 druby Web Who is translating it? http://dx.doi.org/10.1007/s10766-008-0086-1 $32.00 International Journal of PARALLEL PROGRAMING Must buy! http://dx.doi.org/10.1007/s10766-008-0086-1 toruby LT Linux

More information

Microsoft PowerPoint - dm1_7.pptx

Microsoft PowerPoint - dm1_7.pptx スケジュール 09/26 イントロダクション1 : デジタル画像とは, 量 化と標本化,Dynamic Range 10/03 イントロダクション2 : デジタルカメラ, 間の視覚, 表 系 10/10 フィルタ処理 1 : トーンカーブ, 線形フィルタ デジタルメディア処理 1 担当 : 井尻敬 10/17 フィルタ処理 2 : 線形フィルタ, ハーフトーニング 10/24 フィルタ処理 3 :

More information

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( "data.t

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( data.t C++ 1 C C++ C++ C C C++ 1.1 C printf() scanf() C++ C 1-1 #include int a; scanf( "%d", &a ); printf( "a = %d\n", a ); C++ 1-2 int a; std::cin >> a; std::cout

More information

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2  2 B R b I 4 003 4 30 1 ASCII ( ) 0 17 0 NUL 16 DLE SP 0 @ P 3 48 64 80 96 11 p 1 SOH 17 DC1! 1 A Q a 33 49 65 81 97 113 q STX 18 DC " B R b 34 50 66 8 98 114 r 3 ETX 19 DC3 # 3 C S c 35 51 67 83 99 115 s 4 EOT

More information

Ver.1 1/17/2003 2

Ver.1 1/17/2003 2 Ver.1 1/17/2003 1 Ver.1 1/17/2003 2 Ver.1 1/17/2003 3 Ver.1 1/17/2003 4 Ver.1 1/17/2003 5 Ver.1 1/17/2003 6 Ver.1 1/17/2003 MALTAB M GUI figure >> guide GUI GUI OK 7 Ver.1 1/17/2003 8 Ver.1 1/17/2003 Callback

More information