You can bring any calculator you want, we don't actually have restrictions for calculator types here, but what you can't do, is you can't program any relevant chemical or information about constants in there.
你可以带你想用的任何一种计算器,我们并不限制计算器的类型,但是有一点是不允许的,那就是你不能使用编程的功能来记录,相关的化学常数或其它信息。
I think for any type of a night activity that you're looking for you could probably find it.
我觉得任何类型的夜生活,你在旧金山都能找到。
You'll learn a lot more about this if you take organic chemistry, but, In fact, you can then go on and make a bunch of other different kinds of very interesting molecules.
如果你选了有机化学课,你会对它有更多的了解,但是,实际上,你可以继续制造出一堆,其它不同类型的有意思的分子。
So you're implementing this black box, and if its purpose in life is to actually return a value, you have to tell the compiler what kind of value to expect, and this is going to have ripple effects.
你在实现这个黑盒子,如果它的目的是,返回一个值,你必须告诉编译器你期望的是什么类型的值,这个将是一个连锁反应。
And one of the things that was useful here is, that we actually know that the set of primitives that you want to use is very straight-forward.
这儿有一个很有用的东西是,我们实际知道你想用的,一系列基本类型是非常明显的。
The personal income tax is not simple; it's not just a flat rate on your income, it depends on the type of income.
个人所得税计税方法并不简单,并不是统一的征收税率,而是取决于你收入的类型
What kind of movies have you watched recently?
你最近看了什么类型的电影?
These are problems that look a lot like what you might have to do during their weekly assignment if you were a student in this course.
讲的那些问题,基本上是,如果你上那个课,会遇到的周作业的类型。
What kind of music do you like?
你喜欢什么类型的音乐?
It's not always how fast you throw the fastball, sometimes it's your different styles or the different ways that you decide when to throw what.
这不总是你投出,棒球的速度有多快,有时这是你投球的类型,或者你决定采用的投球方式。
So first just a couple of teasers if you are in fact the geeky type, so our friends at Microsoft are having this little nerd party in a few days.
首先是几个广告,如果你是那种不太受欢迎的类型,我们在微软的朋友几天后会举办一个小派对。
And by that, I mean anything that can be described in one of these process, you can capture in that set of primitives.
对于那个,我的意思是任何东西,都可以用这个流程中的一部分来表达出来,你可以从那堆基本类型中间挑选。
Well basically what we're doing is we're giving ourselves the ability to create data types the same way that we have some built-ins, so we have things like int, float, string, these are built-in data types.
就是要赋值我们自己创建,和内置的数据类型,相同的数据类型的能力,我们有一些内置的数据类型,如int,float,string等,如果你考虑下这些数据类型。
So input is an int called F, print out to the screen or your piece of paper the value of C. Odds are you only need two, maybe three lines of code for this, but the goal ultimately will be try it on your own.
所以输入是一个int类型的F,在你的屏幕上,或你们的纸上打印出C的数值,可能你们需要两行或者三行的代码,但是最终的目标需要你自己独自尝试。
int So whereas before I mentioned int, turns out if you wanna put a string in a variable, you have to say this is a string.
先不管我之前提到的,如果你想把一个字符串赋给某个变量,那你必须事先声明这个变量是string类型的。
And if you think about it, associated with each - one of those data types is a set of functions it's intended to apply to.
你会发现每个类型都有,与之对应的一个集合的操作,有的时候这些操作,有的时候某个操作可以,应用于多种数据类型。
You have to be ever so explicit as to what data type your actually passing in.
你必须很清楚,你们输入的参数是什么类型的。
But in terms of drugs that don't look like maybe this compound was used in the synthesis, many of them might have used thionyl chloride, because it generates such a nice reactive intermediate that you can go on and make a bunch of different compounds from that intermediate.
但是对于药物来说,它们可能跟合成过程中用到的这种化合物并不相像,很多药物的制造过程中都会用到亚硫酰氯,因为它能产生活性如此之高的反应中间体,以至于你可以继续利用反应中间体,来制造一堆不同类型的化合物。
Right, and just to get a sense of this, let's look at a simple little example, so on your hand-out, you'll see I've got a little piece of code that says assuming I've got one of these points, I want to do things with it, for example I might want to add them together.
这些数组中的一个,你怎么能够知道,它是哪种类型的呢?,你怎么知道它是以笛卡尔坐标,表示的还是以极坐标,形式表示的呢?,你没有可以用来区分的东西,你没有说明这种信息,聚集实际上的意义。
If you want to output an integer or other types as we'll see.
如果你想输出一个整数,我们将学习到的其他类型。
You don't want to make those changes.
你不该改变变量的类型。
Well, unfortunately in C, you have to be ever so specific as to what you wanna put in the variable.
很不幸,在C语言里,给变量赋值之前,你必须搞清楚它的数据类型。
So it turns out there's a solution to this: If you need more precision, more digits after the decimal point than a float allows, what do you go for instead?
所以这里有一个解决方案:,如果你需要比float类型允许的更高精度,小数点后更多位数,那你该用什么取代它?
And just as with variables, you should use some common sense, some style here, and the function's name should X Y communicate what it does, calling it X or Y or Z is generally not all that helpful.
就像变量,你使用一些常识,一些类型,和函数名需要,传达它所做的事情,把它叫做,或者Z通常是没有什么用处的。
应用推荐