It's worth it!

我们总是处在决定和选择之中,决定一件事情是否该做,是否值得做;选择我们认为重要的,放弃我们认为不重要的。而这个过程往往是艰难的,痛苦的,我们会反复地衡量得与失,理性地分析对与错。也许只有当我们静心独处,仔细倾听内心的声音的时候,才能做出一个不后悔的选择。

Horror gripped the heart of the World War I soldier as he saw his lifelong friend fall in battle. Caught in a trench with continuous gunfire whizzing over his head, the soldier asked his lieutenant if he might go out into the "No Man’s Land" between the trenches to bring his fallen comrade back.

"You can go," said the Lieutenant, "but I don’t think it will be worth it. Your friend is probably dead and you may throw your own life away." The Lieutenant’s words didn’t matter, and the soldier went anyway.

Miraculously he managed to reach his friend, hoisted him onto his shoulder, and brought him back to their company’s trench. As the two of them tumbled in together to the bottom of the trench, the officer checked the wounded soldier, then looked kindly at his friend. "I told you it wouldn’t be worth it," he said. "Your friend is dead, and you are mortally wounded."

"It was worth it, though, sir," the soldier said.

"How do you mean ‘worth it’?" responded the Lieutenant. "Your friend is dead!"

"Yes sir," the private answered. "But it was worth it because when I got to him, he was still alive, and I had the satisfaction of hearing him say, ‘Jim, I knew you’d come.’"

Many a time in life, whether a thing is worth doing or not really depends on how you look at it.

Take up all your courage and do something your heart tells you to do so that you may not regret not doing it later in life.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Here's an implementation of the Mint and Coin classes with the required functionality: ```python class Mint: current_year = 2021 def __init__(self, year): self.year = year def update(self): self.year = Mint.current_year def create(self, coin_class): return coin_class(self.year) class Coin: worth_in_cents = 0 def __init__(self, year): self.year = year def age(self): return Mint.current_year - self.year def worth(self): extra_cents = max(0, self.age() - 50) return Coin.worth_in_cents + extra_cents class Quarter(Coin): worth_in_cents = 25 class Dime(Coin): worth_in_cents = 10 class Nickel(Coin): worth_in_cents = 5 class Penny(Coin): worth_in_cents = 1 ``` In this implementation, the `Mint` class has an instance variable `year` which represents the year stamp of the mint. The `update` method sets this year stamp to the current year (`Mint.current_year`). The `create` method takes a coin class as an argument and returns an instance of that class stamped with the mint's year. This is achieved by passing the mint's year to the constructor of the coin class. The `Coin` class has an instance variable `year` which represents the year stamp of the coin. The `age` method calculates the age of the coin by subtracting the coin's year from the current year of the mint (`Mint.current_year`). The `worth` method calculates the worth of the coin by adding the base worth (stored in the `worth_in_cents` class variable) to one extra cent for each year of age beyond 50. Finally, there are subclasses of `Coin` for each denomination, with the `worth_in_cents` class variable set appropriately.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值