/
diev
/
swaroopch-byte-of-python
Обзор
Документация
Войти
/
diev
/
swaroopch-byte-of-python
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
programs/while.py
19 строк
476 B
Swaroop C H
Add programs folder
19 янв 2016, 18:47
19 янв 2016, 18:47
ed99d1b
Код
Авторство
О чём код?
number = 23 running = True while running: guess = int(input('Enter an integer : ')) if guess == number: print('Congratulations, you guessed it.') # this causes the while loop to stop running = False elif guess < number: print('No, it is a little higher than that.') else: print('No, it is a little lower than that.') else: print('The while loop is over.') # Do anything else you want to do here print('Done')