windows 徽标编程语言实现
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1020890/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Logo programming language implementations
提问by Nathan Fellman
The "joke" question Joel askedduring podcast #58made me all nostalgic for Logo, which was the second language I ever programmed in, after Basic, and which is why I never had any trouble with recursion in college.
Joel在播客 #58 中提出的“笑话”问题让我非常怀念 Logo,Logo 是我在 Basic 之后编程的第二语言,这就是为什么我在大学里从来没有遇到任何递归问题的原因。
Are there any implementations of Logo for Windows or Linux (the platforms I can use) or Mac (because I know I'm not alone in this world)? How can I get the Logo programming language for my computer?
是否有适用于 Windows 或 Linux(我可以使用的平台)或 Mac(因为我知道我在这个世界上并不孤单)的 Logo 实现?如何为我的计算机获得 Logo 编程语言?
采纳答案by M.Bearden
I'm teaching my kids LOGO successfully on Windows using Elica LOGO. (Kids ages are presently 12 and 10.)
我正在使用Elica LOGO在 Windows 上成功地教我的孩子LOGO。(孩子们现在 12 岁和 10 岁。)
The package's strengths include many "advanced" extensions, beyond the basic 2-dimensional turtle. These include 3-D graphics and simple hooks into the Windows widget world. (You can create Windows forms with buttons, etc., from within your LOGO code.)
该软件包的优势包括许多“高级”扩展,超出了基本的二维海龟。其中包括 3-D 图形和与 Windows 小部件世界的简单挂钩。(您可以从 LOGO 代码中创建带有按钮等的 Windows 窗体。)
Lacks sound/music capability, at least in version 5.5, and the built-in documentation is extensive, with many advanced examples, but it's not very useful in my opinion--due to its incompleteness, and its having many coding examples that contain errors. (But my kids learn more by finding the errors in the programing samples.)
缺乏声音/音乐功能,至少在 5.5 版本中,内置文档丰富,有很多高级示例,但在我看来它不是很有用——因为它的不完整,并且它有许多包含错误的编码示例. (但我的孩子通过查找编程示例中的错误来了解更多。)
回答by daviewales
Fire up a terminal on Mac or Linux, and type python
, then press Return or Enter. Then type from turtle import *
, then Return or Enter. Now type fd(100)
, then Return or Enter. Hooray! Logo with Python! =D (Windows users can install Python here)
在 Mac 或 Linux 上启动终端python
,然后键入,然后按 Return 或 Enter。然后键入from turtle import *
,然后按 Return 或 Enter。现在输入fd(100)
,然后回车或回车。万岁!带有 Python 的标志!=D(Windows 用户可以在这里安装 Python )
Documentation
文档
For a complete list of commands, see the online documentation. Note that the documentation will tell you to type turtle.fd(100)
, rather than fd(100)
, because they chose to use import turtle
, rather than from turtle import *
. The star method is almost always bad, because it makes it possible to confuse your own functions with those in the module, but in this case it is good, because it lets us control the turtle with proper logo commands.
有关命令的完整列表,请参阅在线文档。请注意,文档会告诉您键入turtle.fd(100)
,而不是fd(100)
,因为他们选择使用import turtle
,而不是from turtle import *
。星型方法几乎总是不好的,因为它可能会混淆你自己的函数和模块中的函数,但在这种情况下它是好的,因为它让我们用正确的标志命令控制海龟。
Saving logo functions
保存标志功能
Create a file called shapes.py
, and save it somewhere sensible. Add the following code to shapes.py
:
创建一个名为 的文件shapes.py
,并将其保存在合理的位置。将以下代码添加到shapes.py
:
from turtle import *
def square(size):
for i in range(4):
fd(100)
rt(90)
def fun(size):
for i in range (10):
square (size)
rt(36)
Now, whenever you want to do logo, navigate to wherever you saved shapes.py
before running python
. Then, after running python
, run from shapes import *
instead of from turtle import *
. This will import logo along with any custom functions you have defined in shapes.py
. So, whenever you make a cool function, just save it in shapes.py
for future use.
现在,无论何时您想要制作徽标,都可以导航到shapes.py
运行前保存的任何位置python
。然后,在运行后python
,运行from shapes import *
而不是from turtle import *
。这将导入徽标以及您在shapes.py
. 因此,无论何时您制作了一个很酷的功能,只需将其保存以shapes.py
备将来使用。
e.g. interactive session (after running python
from the relevant directory):
例如交互式会话(python
从相关目录运行后):
from shapes import *
square(100)
fun(50)
回答by William Leara
Cross-platform versions: http://www.mathcats.com/gallery/logodownloadinfo.html
跨平台版本:http: //www.mathcats.com/gallery/logodownloadinfo.html
MacOS X specific: http://www.alancsmith.co.uk/
MacOS X 专用:http: //www.alancsmith.co.uk/
Open-source Logo:
http://sourceforge.net/projects/fmslogo
http://www.rz.uni-augsburg.de/~micheler/en/
开源标志:
http: //sourceforge.net/projects/fmslogo
http://www.rz.uni-augsburg.de/~micheler/en/
回答by ephemient
UCBLogois my favorite LOGO implementation, and happens to be available for Windows, UNIX (with X11 support for turtle drawing), and Mac OS X, with outdated ports for DOS and Mac OS 9 as well.
UCBLogo是我最喜欢的 LOGO 实现,碰巧可用于 Windows、UNIX(X11 支持绘制海龟)和 Mac OS X,还有用于 DOS 和 Mac OS 9 的过时端口。
Most Linux distros alreadyhaveitpackaged.
It is also still maintained (thanks to cheap laborstudents at Berkeley), open-source, and very portable (I've run it on various flavors of UNIX, including Linux, and various processor architectures as well).
它仍然得到维护(感谢伯克利的廉价劳动力学生)、开源且非常便携(我已经在各种 UNIX 版本上运行它,包括 Linux,以及各种处理器架构)。
UCBLogo comes with a fairly comprehensive standard library and good documentation; the source code for the examples in Brian Harvey's "Computer Science Logo Style" books are also included.
UCBLogo 带有相当全面的标准库和良好的文档;还包括 Brian Harvey 的“计算机科学徽标样式”书籍中示例的源代码。
Addendum:
附录:
papert - logo in your browseris surprisingly featureful, and seems to work in any modern browser.
papert - 浏览器中的徽标功能非常强大,似乎可以在任何现代浏览器中使用。
回答by Arman
KTurtle - http://edu.kde.org/applications/school/kturtle/is what you need under linux.
KTurtle - http://edu.kde.org/applications/school/kturtle/是你在 linux 下所需要的。
for windows version of kturtle visit windows.kde.org
对于 Windows 版本的 kturtle,请访问 windows.kde.org
回答by Peter Neubauer
To really recreate the nostalgia, you might try running Logo on an emulated Apple II. You can get images of Apple II disks for Logo hereand the AppleWin emulator here.
要真正重现怀旧之情,您可以尝试在模拟的 Apple II 上运行 Logo。您可以在此处获得Apple II 磁盘的 Logo图像和AppleWin 模拟器。
回答by lucio bosque
The best way to teach kids logo now it through TurtleAcademy http://turtleacademy.com. That's a really cool site for starting learning the logo principles and it's free
现在通过 TurtleAcademy http://turtleacademy.com教孩子标志的最佳方式。这是一个非常酷的网站,可以开始学习徽标原则,而且是免费的
回答by gldnspud
There is a pure-Python version of Logo available at http://pylogo.org/
有一个纯 Python 版本的 Logo 可用在http://pylogo.org/
回答by JustJeff
Here's a good free one for windows http://www.softronix.com/logo.html
这是一个很好的免费 Windows http://www.softronix.com/logo.html
And there's a parellel logo you might look at http://ccl.northwestern.edu/netlogo/
还有一个平行标志,你可以看看 http://ccl.northwestern.edu/netlogo/
Also, MIT has a good parallel logo called starlogo http://education.mit.edu/starlogo/
此外,麻省理工学院有一个很好的平行标志,称为 starlogo http://education.mit.edu/starlogo/
回答by luc
http://tortue-logo.fris a browser version of the logo language. It is developped in javascript with raphaeljs (server side with python/django but the interpreter is running on the client side).
http://tortue-logo.fr是徽标语言的浏览器版本。它是用 raphaeljs 用 javascript 开发的(服务器端使用 python/django,但解释器在客户端运行)。
It only makes possible to play with the turtle but it may be enough to remind you good time learning how to program. :) i think it should cover the main commands of the LOGO language.
它只能让你和乌龟一起玩,但它可能足以提醒你学习编程的好时机。:) 我认为它应该涵盖 LOGO 语言的主要命令。
Currently french and english are supported. The french version of LOGO is different from the english one (commands are translated in french). SO make sure to choose the right language on the site.
目前支持法语和英语。LOGO的法语版与英文版不同(命令用法语翻译)。所以请确保在网站上选择正确的语言。
I hope you'll enjoy
我希望你会喜欢