Now for the hacker edition, if you are feeling up to a bit more of a challenge you'll find that when you run the game, one it's not all that hard to use some ASCII art just make it a little fancier as the teaching fellow who implemented this solution did.
对于升级版,如果你能应付更大的,挑战,你会发现当你在玩这个游戏时,用一些字符画把它做得,比那些教学人员做的更有新意,并不是那么困难。
But this is perhaps a very simple example of ASCII art.
这是字符艺术方面一个非常简单的例子。
STUDENT: So, the string A is less than three, is false because they're comparing like ASCII values?
学生:字符串A比数字3小,是false的原因是因为对他们,进行了ASCII值的比较么?
Well it turns out a bunch of years ago people just decided that if we have the ability to express numbers and we actually care about expressing letters of the alphabet, well we just need some kind of mapping between one and the other, ASCII and so thus was born what's generally called the ASCII.
结果证实,数年前,人们觉得如果我们,有数字表达能力,而我们真正在乎其实是字符的表达,那么我们就需要数字和字符的某种对应关系,于是就有了俗称的。
You just need to express in ASCII character, one at a time, and these brave souls are simply going to spell something out for us to hammer home this point of binary.
你们只需要每人代表一个ASCII码,这些勇敢的小伙子们就是想,清楚的让大家理解二进制原理。
> But if you actually do the math, those zeros and ones translate to an ASCII character which is D which is gonna be a 65, 66, 67, 68 would be the letter D.
>,你们自己算算看,把这些0和1转换成D对应的ASCII码,那么就是,65,66,67,68,对,68对应于“D“
Now as an aside, turns out you can do more interesting formatting with printf, and this is useful even for ASCII art purposes.
说点题外话,结果你可以用printf来打印其他的格式,这是非常有用的,甚至是为了ASCII艺术的目的。
5 So similarly would there be the number 65 next to this then the corresponding number for V-I-D and then there's generally a special character at the end that looks like a zero that says end of string here.
同样,A就是,接着再填上V-I-D对应的ASCII码,在最后还有添上一个特殊的字符,有点像0,代表这是该字符串结束。
Now, once you know each of those, you can now do 25 more upper case letters and 25 more lower case letters then there are some other stuff like punctuation and things you see on the keyboard.
一旦你知道两者中的任何一个,你就知道了另外25个,大写字母和小写字母,标点和在键盘上的,各种符号也有ASCII码。
> >> David: So yeah, not binary per se but ASCII, right?
>,【无法辨认的声音】,>>,大卫:是这样的,不是二进制本身,而是用ASCII码,对吗?
This might look a little cryptic at first, but it turns there is some very obvious patterns here, for instance. According to this chart, if you want to represent the letter A A in the so called ASCII system, what number do you actually use to do so?
起初,它看起来有点神秘,但你会发现它有一些明显的对应模式,这里就有例子,根据图表,在所谓的ASCII系统中,你想表示字母,你该用哪些数字呢?
And the thing we've seen thus far is called "ASCII."
我们目前看到的这个东西叫做“ASCII“码“
And ASCII recalls the code that we talked about last week.
回想一下我们上周提到的ASCII码。
In this case, it's a sequence of ASCII characters.
在这里,就是一系列ASCII码。
human text, ASCII text as input and output zeroes and ones that represent that program in a manner that the CPU, interesting, dammit, not installed on this computer.
编译器以人输入的文本,ASCII码为输入,它输出一些cpu实际上可以理解的,在这台计算机上没有安装。
The answer is, I don't know if it's ASCII.
答案是,我不知道是不是对ASCII值进行比较的。
Now ASCII involves characters.
现在ASCII码包含字符了。
But ASCII is just a code.
但是ASCII仅是一种编码。
I have connected to the course's central server from my own laptop and via dot slash chart am I about to run a little program that depicts as best we can with what with generally call ASCII art -- -- it's really all you can do in a terminal window like this -- our numbers from the past few years.
我已经通过我的电脑连接到了课程的中心服务器,在我的笔记本电脑上,通过键入“,/chart“,我将要运行一个被描写成,“ASCII码艺术“的小程序-,在一个这样的终端窗口中你们都可以做到-,过去几年中我们的人数。
应用推荐