#!/usr/local/bin/python3
#-*-編碼:utf-8 -*-
定義消耗(人工):
打印(" 1111111111111111165438 ")
雖然正確:
print(" 2222222222:% s需要食物" %man "
骨頭=產量
print("33333333333:%s吃%s食物" %(人,骨頭))
定義產品(對象):
print(" 44444444444 ");
雖然正確:
r =產量
print(" 55555555555 r = = % s " % r ";
對於範圍(r)內的I:
print("product:making food index是% s " % I ";
發送
if __name__ == "__main__ ":
con1 = consum("Fat ")
con1.send(無)
con2 =產品(con1)
con2.send(無)
con2.send(2)
con2.send(4)
con2.send(6)