Commits

Takayuki KONDO  committed 1b0a5bd

#24 関数を扱ってみよう(1)

  • Participants
  • Parent commits 92e4960

Comments (0)

Files changed (1)

 # -*- coding:utf-8 -*-
-# while 
+# 関数
+# 引数
+# 返り値
 
+def hello(name, num):
+    print "hello! %s" % name * num
 
-n = 0
 
-while n < 10:
-    if n == 3:
-        n+=1
-        continue #break
-    print n
-    n += 1
-else:
-    print "end"
-
-
+hello("Tom", 2)
+hello("Steve", 3)