nickel.sh 和 getsysinfo.sh

getsysinfo日志收集:

附件getsysinfo.zip解压后,通过FTP方式,并以二进制(BINARY)模式,将 'getsysinfo.sh' 上传至主机的 /tmp 目录下;
# cd /tmp
# chmod 777 getsysinfo.sh
# sh getsysinfo.sh
生成log为/tmp/sysinfo.tgz
通过FTP方式,并以二进制(BINARY)模式,将/tmp/sysinfo.tgz下载到本地

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

nickel日志收集(不要在系统负载较高时运行此脚本):

附件nickel.zip解压后,通过FTP方式,并以二进制(BINARY)模式,将 'nickel.sh' 上传至主机的 /tmp 目录下;
# cd /tmp
# chmod 777 nickel.sh
# sh nickel.sh
通过FTP方式,并以二进制(BINARY)模式,将/tmp/tools/nickel.YourHostName.tar.gz下载到本地

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15412087/viewspace-1841067/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/15412087/viewspace-1841067/

Complete the Mint and Coin classes so that the coins created by a mint have the correct year and worth. - Each Mint instance has a year stamp. The update method sets the year stamp to the current_year class attribute of the Mint class. - The create method takes a subclass of Coin and returns an instance of that class stamped with the mint's year (which may be different from Mint.current_year if it has not been updated.) - A Coin's worth method returns the cents value of the coin plus one extra cent for each year of age beyond 50. A coin's age can be determined by subtracting the coin's year from the current_year class attribute of the Mint class. ```python class Mint: """A mint creates coins by stamping on years. The update method sets the mint's stamp to Mint.current_year. >>> mint = Mint() >>> mint.year 2020 >>> dime = mint.create(Dime) >>> dime.year 2020 >>> Mint.current_year = 2100 # Time passes >>> nickel = mint.create(Nickel) >>> nickel.year # The mint has not updated its stamp yet 2020 >>> nickel.worth() # 5 cents + (80 - 50 years) 35 >>> mint.update() # The mint's year is updated to 2100 >>> Mint.current_year = 2175 # More time passes >>> mint.create(Dime).worth() # 10 cents + (75 - 50 years) 35 >>> Mint().create(Dime).worth() # A new mint has the current year 10 >>> dime.worth() # 10 cents + (155 - 50 years) 115 >>> Dime.cents = 20 # Upgrade all dimes! >>> dime.worth() # 20 cents + (155 - 50 years) 125 """ current_year = 2020 def init(self): self.update() def create(self, kind): "*** YOUR CODE HERE " def update(self): " YOUR CODE HERE " class Coin: def init(self, year): self.year = year def worth(self): " YOUR CODE HERE ***" class Nickel(Coin): cents = 5 class Dime(Coin): cents = 10
06-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值