晒网

Knowledge is Power

MIT 6.00.1x 计算机科学和Python编程导论 Set 4

Word Scores 为单词算分值

感谢 glhezjnucn 童鞋的给力翻译!!
The first step is to implement some code that allows us to calculate the score for a single word. The function getWordScore should accept as input a string of lowercase letters (a word) and return the integer score for that word, using the game’s scoring rules.
代码设计的第一步是让我们为一个单词计算它的得分。函数getWordScore 接收一个小写字母串 (一个单词),然后按照游戏的积分规则返回它的得分值 。

Read More

MIT 6.00.1x 计算机科学和Python编程导论 Set 3

Radiation Exposure

感谢 glhezjnucn 同学贡献的翻译!
“Radioactive decay” is the process by which an unstable atom loses energy and emits ionizing particles - what is commonly refered to as radiation. Exposure to radiation can be dangerous and is very important to measure to ensure that one is not exposed to too terribly much of it.辐射衰变是不稳定原子失去能量并释放电离子的过程-这通常被称为辐射。接触辐射(暴露于辐射)可能是危险的,同时检测并确保人们不暴露于过量辐射(的环境)中变得重要。

Read More

小游戏《Let's Go! PiPiXia!》

在知乎上发现此游戏的分享,非常感谢作者的分享。这是我阅读的第一个小项目代码。给我最深的体会便是divide and conquer,逐步实现模块的功能,最后实现游戏的功能。简单分析,好像游戏实现的思路并不难。

Read More

MIT 6.00.1x 计算机科学和Python编程导论 Set 2

Paying Off Credit Card Debt

Each month, a credit card statement will come with the option for you to pay a minimum amount of your charge, usually 2% of the balance due. However, the credit card company earns money by charging interest on the balance that you don’t pay. So even if you pay credit card payments on time, interest is still accruing on the outstanding balance.

Read More