你(Are)开始学习代码了吗?这个过程可能看起来太高了,你一定被建议采取一些小步骤。但是在深入了解编程的技术概念之前,您是否考虑过交互式选项?麻省理工学院的(MIT)Scratch是一款免费的教育工具,可帮助用户使用交互式块创建动画和游戏。这不仅有助于掌握编程的概念,而且工具本身也很有趣。
Scratch – 学习(Scratch – Learn)计算机编程
Scratch已经存在了很长一段时间了。哈佛的CS50x(CS50x)向我介绍了这个工具。Scratch称自己为基于块的可视化编程语言。该工具的最初目的是向小孩子教授编程概念,但该工具也得到了成年人的好评。该工具帮助许多学生在不编写实际代码的情况下理解计算机编程的基本概念。
Scratch上已经创建了许多项目,最好的部分是您可以查看、播放甚至编辑现有项目。这让您很好地了解了该工具的工作原理以及可以使用的可能性。
由于该工具是为初学者和儿童设计的(intended for beginners and children),它带有一个非常简单易用且交互性很强的 UI。您可以创建一个新项目并按原样开始工作;您无需注册即可使用Scratch。
Scratch项目中最基本的元素或参与者是Sprite。您可以添加尽可能多的精灵并相应地控制它们。该工具内置了很多Sprite(Sprites),您甚至可以从计算机上传自定义的 Sprite。添加Sprite(Sprites)完成后,您可以选择舞台背景并自定义Scratch项目的视觉效果。
现在是时候添加真正的逻辑了,这样你的Sprite(Sprites)就可以按预期运行了。所有代码块都在左侧菜单中可用,您可以将合适的块拖到工作区域中。您可以连接任意数量的块。这背后的动机是创建一个工作逻辑来指导您的 Sprite 了解环境规则。
这些块被很好地分类为Motion、Looks、Sound、Events、Control、Sensing、Operators和Variables。运动(Motion)块可以帮助您在Sprite周围移动。外观(Looks)可以定义角色的外观;您可以以编程方式更改角色的服装或颜色。声音(Sound)块可以播放声音、增加音量等。Scratch内置了很多声音,但您也可以上传或录制自定义声音。
事件块是让Sprite对事件做出反应的好方法。有很多可用的事件块,包括最流行的“点击绿旗时(When Green Flag Clicked)”事件。控制块允许您在其他块中创建 if-else 或循环逻辑。感应块再次成为感应环境和事件的好方法。运算符使您可以访问常见的算术和逻辑运算符。变量包含所有可以让您保存和访问一些数据到通用变量的块。
如果内置块似乎无法解决您的目的,您也可以创建块。自定义块在我的块下可用。
Scratch 无疑是开始您的计算机编程之旅的一个非常好的工具。它对儿童和成人来说都是一个很好的工具。易于使用的界面和堆叠预编程块的概念非常有效,因此,您可以在Scratch 网站(Scratch website)(Scratch website)上看到许多有趣的项目。
Scratch: Free interactive tool to learn computer programming
Are уou stаrting to learn code? The process might seem exorbitant, and yoυ muѕt have been adνised to take small stepѕ. But have you considered an interactive optiоn before you dive into the technical concepts of programming? Scratch from MIT is a free educational tool that helps it users create animations and games using interactive blocks. This not only helps grasp the concepts of programming but the tool itself is also fun to use.
Scratch – Learn computer programming
Scratch has been around for quite some time now. I was introduced to this tool by Harvard’s CS50x. Scratch calls itself a block-based visual programming language. The original purpose of the tool was to teach programming concepts to small children, but the tool has been well perceived by adults too. The tool has helped many students understand the basic concepts of computer programming without writing an actual line of code.
There are numerous projects already created on Scratch, and the best part is that you can view, play, or even edit existing projects. This gives you a good idea about how the tool works and what are the possibilities it can be used in.
Since the tool is intended for beginners and children, it comes with a very simple to use and quite interactive UI. You can create a new project and start working as is; you do not need to sign-up to use Scratch.
The most basic element or the actor inside a Scratch project is a Sprite. You can add as many sprites and control them accordingly. There are a lot of Sprites built into the tool, and you can even upload custom ones from your computer. Once you are done adding Sprites, you can choose the background of the stage and customize the visuals of your Scratch project.
Now it is time to add the real logic so that your Sprites act as intended. All the code-blocks are available on the left menu, and you can drag a suitable block into the working area. You can connect as many blocks you’d like. The motivation behind this is to create a working logic that guides your Sprite about the rules of the environment.
The blocks are well-categorized into Motion, Looks, Sound, Events, Control, Sensing, Operators, and Variables. Motion blocks can help you move around your Sprite. Looks can define how the character appears; you can change a character’s costume or colors programmatically. Sound blocks can play sounds, increase volume, etc. Scratch has plenty of sounds built into it, but you can also upload or record custom sounds.
Events block are a good way to make a Sprite react to an event. There are a lot of event blocks available including the most popular When Green Flag Clicked event. Control blocks let you create if-else or looping logic within other blocks. Sensing blocks are again a good way to sense environment and events. Operators give you access to common arithmetic and logical operators. Variables contain all the block that would let you save and access some data to general purpose variables.
If the inbuilt blocks don’t seem to solve your purpose, you can create your blocks as well. Custom blocks are available under My Blocks.
Scratch is undoubtedly a very good tool to start your computer programming journey. It is a good tool for both children as well as adults. The easy to use interface and the concept of stacking pre-programmed blocks works very well and a result of which, you can see many interesting projects on the Scratch website.