ʹÓÃpython½øÐе¥Ôª²âÊÔ
ÇëÎÊÔõô¶ÔÒÔÏÂÕâ¶Î´úÂë×öµ¥Ôª²âÊÔÄØ£¿£¨°üÀ¨Ê¹Ó÷¾¶¸²¸Ç¡¢Ìõ¼þ¸²¸ÇµÈ°×ºÐ²âÊÔ·½·¨£©
class Case_one:
def __init__(self):
self.__a = 100
self.__b = 200
def function_a(self):
if self.__a > 50 :
print "function_a"
self.__a = 200
else:
self.__a = 0
def function_b(self):
if self.__a == self.__b:
print "function_b"
elif self.__b < 150:
self.__a = 0
else:
self.__b = 0
def function_print(self):
print 'a is %d' %self.__a
print "b is %d" %self.__b
лл¡«¡«¡«
Èç¹û»¹ÓÐ
def function_c(self):
c = 0
c = self.__a+self.__b
print "a + b",c
Ó¦¸ÃÔõô²âÄØ
Ïà¹ØÎÊ´ð£º
¸Õ½Ó´¥£¬¸Ð¾õ¹¦ÄܱȽÏÇ¿´ó£¬Ö÷ÒªÊÇÕ³ºÏÐԺ㬿ÉÒÔÓлú½áºÏÆäËûÓïÑÔ¡£µ«²»Ã÷°×ËüÖ÷ÒªÓ¦ÓÃÓÚʲôÁìÓò£¬Ö÷Òª×öÄÇ·½ÃæµÄ¶«¶«¡£¿ª·¢ERPϵͳÊÇ·ñ¿ÉÐУ¿
»ù±¾ÉÏʲô¶¼¿ÉÒÔ×ö
½ñÌìÈ¥¿´ÁËһϣ¬»ù±¾ÉÏʲô ......
Ïñ C µÄ scanf() ÄÇÑù
±ÈÈç¶ÁÈë 1 2 3 a b c
ÿ´Î¶ÁÈëÒ»¸ö
ÏÂÃæÕâ¸öÓ¦¸ÃÊÇÄãÏëÒªµÄ°É£º
Python code:
>>> k = raw_input()
0 0123 ds dsl sd
>>> k
'0 0123 ds dsl sd'
>>> ......
´ó¼ÒºÃ£¬ÎÒÊÇÒ»¸öÐÂÊÖ£¬¸Õ¿ªÊ¼Ñ§python£¬µ«ÊǸտªÊ¼µÄhelloworld¶¼Ã»·¨´òÓ¡£¬ÈÃÎÒºÜÎÞÄΡ£
ÎÒµÄpython°²×°Â·¾¶Îªf:\python31¡£ÔÚpathÖÐÒ²ÉèÖöÔÁË£¬ÔÚwindowsÏÂÔËÐÐÊÇÕâÑùÏÔʾµÄ£¬Ï£Íû¸÷λǰ±²Ö¸µãһϡ£Ð»Ð»
Pyth ......
ÇëÎʸßÊÖ£¬ÎÒÓõÄÊÇpythonwin2.5µÄ°æ±¾£¬ÔÚ¿ª·¢µÄ¹ý³ÌÖÐÓöµ½ÁËÏÔʾÖÐÎÄÂÒÂëµÄÎÊÌâºÜÍ·ÌÛ£¬Çë¸ßÊִͽ̡£
¼òµ¥µÄ´úÂëÈçÏ£¬±£´æµÄÎļþÃûÊÇÓ¢Îĵģ¬ÎÒÊÇÓÃpythonwinн¨µÄ½Å±¾£¬±£´æµÄʱºòÑ¡ÏîÀïûÓбàÂëÑ¡ÏÔËÐк ......