||
Python Village - INI1: Installing Python
首先下载你的操作平台适合的Python,地址:http://wiki.python.org/moin/BeginnersGuide/Download
安装完之后,运行IDLE,出现一个界面,内有3个箭头,代表一切正常,可以输入指令了
>>>
试试输入“1+1”,看看结果:
>>>
可以看到返回值为2,代表你输入了指令1+1,Python给你返回了1+1的结果。
另外,也可以新建一个文档,然后命名,比如“hello.py”,在文档中写入
print “Hello, World!”
之后用Python运行该文档(IDLE中选择File→New Window→写入脚本→Run→Run Module;命令行下直接python hello.py),Python返回:
Hello, World!
👌,已经学会Python的第一个编程了,恭喜!
Problem
After downloading and installing Python, type import this into the Python command line and see what happens. Then, click the "Download dataset" button below and copy the Zen of Python into the space provided.
这个很简单,安装完Python后,输入“import this”指令,然后得到Python返回值就行:
The Zen of Python, by Tim Peters
>>>
Rosalind is a platform for learning bioinformatics and programming through problem solving. Take a tour to get the hang of how Rosalind works.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-22 08:52
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社