python while statement
2014-04-21 08:09
330 查看
#while usage
x=int(raw_input('input a number:'));
s=0;
while(x<=100):
x=x+1;
s=s+x;
print 'hello world!';
print s;
#python 刷阅读次数
import webbrowser as web
import time
import os
import random
url=raw_input('please input url address:');
count=random.randint(2,4);
j=0;
print count;
while j<count:
i=0;
while i<10:
web.open_new_tab(url);
i=i+1;
time.sleep(1);
else:
os.system('taskkill /f /im chrome.exe');
print j,'time closing browser!'
j=j+1;
x=int(raw_input('input a number:'));
s=0;
while(x<=100):
x=x+1;
s=s+x;
print 'hello world!';
print s;
#python 刷阅读次数
import webbrowser as web
import time
import os
import random
url=raw_input('please input url address:');
count=random.randint(2,4);
j=0;
print count;
while j<count:
i=0;
while i<10:
web.open_new_tab(url);
i=i+1;
time.sleep(1);
else:
os.system('taskkill /f /im chrome.exe');
print j,'time closing browser!'
j=j+1;
相关文章推荐
- python入门科普IDE工具和编译环境
- 哈夫曼树实现 python
- Python3.2官方文档翻译--异常处理
- Python3.2 官方文档翻译--错误与异常
- python 的split 与join
- python dict
- Flask(a microframework for Python) 学习操场 (一)
- python学习笔记——第五章 条件、循环和其他语句
- python文档字符串查找应用---find()
- Python快速学习08:模块的操作
- Python入门
- Python忽略错误
- python--data type
- Python基础之字符串的练习
- Python中的break和continue的用法
- Python 之re模块
- OpenCV-Python 安装
- Fabric:Python远程部署工具
- python 开篇
- 简单扫雷游戏中的编程方法学 - python实现