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. Th...
学堂在线 MITx: 6.00.1x 计算机科学和Python编程导论 problemset3
balance=4213monthlyPaymentRate=0.04annualInterestRate=0.2Month=1monthRate=annualInterestRate/12.0sum=0for i in range(1,13): sum=sum+balance*monthly...
MIT 计算机科学及编程导论 Python 笔记 1
计算机科学及编程导论在 MIT 的课程编号是 6.00.1,是计算机科学及工程学院的经典课程。之前,课程一直使用 Scheme 作为教学语言,不过由于 Python 简单、易学等原因,近年来已经改用 Python 作为教学语言了。更多介绍 最初知道这个课程的时候大概是在 2014 年,对于做事拖沓的...
MIT 计算机科学和Python 编程导论
其实上一本书《笨办法学python》严格意义上来说,算不上是入门书,因为它主要目的是让你去找到敲代码的感觉,基本不涉及计算机的内容。说到真正的入门,MIT的《计算机科学和python编程导论》这门课程是个非常好的选择。对于想要入门python的人来说,这门课程不会让你失望,但是它能给...
MIT 6.00.1x 计算机科学和Python编程导论 Set 1
Counting Vowels Assume s is a string of lower case characters. Write a program that counts up the number of vowels contained in the string s. ...
python 字符串 学堂在线 MITx: 6.00.1x 计算机科学和Python编程导论 problem set 2
s = 'xkhlboetagwpsotgx' max=-1result=''for i in range(0,len(s)): count=1 for j in range(i+1,len(s)): if s[j:j+1]>=s[j-1:j]: ...
MIT 6.00.01X 计算机科学和Python编程导论 week1
词汇: armamentarium 设备 iteration 迭代 data structure 数据结构 recursion 递归 module 模块 modularization 模块化 algorithm 算法 ...
MIT 6.00.1x 计算机科学和Python编程导论 Set 7
Part I: Data Structure Design 感谢 glhezjnucn 童鞋的给力翻译 First, let’s talk about one specific RSS feed: Google News. The URL for the Google News fee...
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, usuall...
MIT计算机科学与编程导论——class1
1.goal(目标) Computation thinking(计算思维) Understand code(read and write code) Understand abilities and limits map problem into comput...
MIT 6.00.1X 计算机科学和PYTHON编程导论-学习笔记(五)递归
迭代: e.g. 计算 x*p def multi(x,p): ans=0 while p>0: ans+=x p-=1 return(ans) 状态变量(设置初始值): 迭代次数i 当前计算结果 result 状态变量 会在迭代的过程中得到...
Python交互式编程导论----事件驱动编程
传统的编程是如下线性模式的:开始--->代码块A--->代码块B--->代码块C--->代码块D--->......--->结束每一个代码块里是完成各种各样事情的代码,但编程者知道代码块A,B,C,D...的执行顺序,唯一能够改变这个流程的是数据。输入不同的数据,...
MIT 6.00.1x 计算机科学和Python编程导论 Set 6
Part1Problem1:Encryption感谢glhezjnucn童鞋对本周问题的给力翻译!You’llnowwriteaprogramtoencryptplaintextintociphertextusingtheCaesarcipher.你现在来写一个函数将使用凯撒密码将明文转为密文。de...
《编程导论(Java)·3.1.2 方法》之 副作用
4.副作用在一些语言如Pascal中,子程序被分成两种:函数和过程。虽然Java没有强制性地要求将方法区分为命令和函数,然而这种区别对于良好地设计程序有很大的帮助[1]。首先说明一个概念:副作用(sideeffect)。副作用一般是针对操作(表达式)而言的,一个操作/表达式有“副作用”是指在对该表达...