使用這個類:使用Python,我將如何採取一個整數參數?
class Person:
def __init__ (self, Name, Address, Phone, Height, Weight):
self.name = Name
self. Address = Address
self.Phone = Phone
self.Height = Height
self.Weight = Weight
self.PoundserPerInch = Height/Weight
我怎麼會拿在參數「身高」和「體重」爲整數,這樣我可以對他們進行一些數學函數?
爲什麼在將它們傳遞給函數之前它們不是整數? – geoffspear 2012-07-14 20:41:31