您的位置:首页 > 编程语言 > Python开发

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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: