python小例子 | 您所在的位置:网站首页 › python十个实例 › python小例子 |
while 使用example#!/usr/bin/python num = 10 run = True while run: guess = int(raw_input('Enter input : ')) if guess == num: print 'Congratulations, you guessed it.' run = False elif guess < num: print 'No, it is a little higher than that.' else: print 'No, it is a little lower than that.' else: print 'The whole loop is over.' print 'Done' |
今日新闻 |
推荐新闻 |
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 |