hello python!
来源:互联网 发布:剑灵金正恩捏脸数据 编辑:程序博客网 时间:2024/06/05 11:06
hello python!
在编写钱首先下载python程序! 软件下载请到官方网站www.python.org 下载
选择download 选择适合你的应用平台 (大多是windows的用户所以选windows项现在)
运行主程序:IDLE(Python GUI)
然后直接在命令行中 输入 :
print "hello python!"
就可已显示出一个helloworld!,这时 你的第一个python程序就已经完成了
python不需要main函数 所以在做脚本语言中很不错!
下面来完成一个简单的运算
i=1j=2i+j
我们也可以用文本进行编辑 点File-New windows然后程序自动打开一个文本编辑器
i=raw_input()
print"this is "+i
点击Run-run Module
数组元素的相加
字符串与数字相乘
从字符串中查找匹配
方法使用 len() max() min()
分解字符串list(" ") 与替换数组元素number[x,y,z,e,f] 删除元素del number[x]
#!/usr/bin/env python2# -*- coding: utf-8 -*-#LICENSE: WTFPL#DEPENDS: on this cool font from http://asdasd.rpg.fi/~svo/glasstty/#TODO: port to Python3from time import sleepfrom sys import stdoutanim = ["|", "/", "-", "\\"]while True: for c in anim: print "Loading (0 %)", c, "\r", stdout.flush() sleep(0.1)
- hello,csdn,hello,python
- Hello Python
- Hello, Python!
- hello python!
- Hello Python!
- Hello Python
- Hello python
- Hello Python!
- Hello Python
- Hello, Python!
- Hello Python
- HELLO PYTHON
- Hello Python!!!
- ArcGIS Python Hello Python
- 【Python】1“Hello,Python!”
- python中的hello world
- Python 的Hello World
- Python hello world
- HDU 1789
- 引用dll时出现“试图加载格式不正确的程序”,解决办法
- Linux C中的opendir()
- Enterprise Architect 中改变UML对象为自定义图像
- Redis学习笔记1--简介及简单安装
- hello python!
- VLAN中继协议(VTP)
- POWER7 的指令周期指标(CPI)模型
- 解决windows传送到linux下中文文件名及文件内容乱码问题
- animation thread /nullPointerException / fill(unknown source)/ processing
- 黑马训练营-学习日记----银行业务调度系统
- poj 1050 nyoj104 矩阵最大和
- 代码大全2(读书笔记2)
- 一个用来处理手机通讯录乱码的小小小小python程序