博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Learn Python 011: while loop
阅读量:6867 次
发布时间:2019-06-26

本文共 374 字,大约阅读时间需要 1 分钟。

from random import choicequestions = ['Why is the sky blue? ',             'Why do cats have 4 legs? ',             'Why is the summer hot? ']question = choice(questions)answer = input(question).lower().strip()while answer != 'just because':    answer = input('Why? ').lower().strip()print('Oh... Okay, I understand now.')

 

转载于:https://www.cnblogs.com/mxyzptlk/p/7190909.html

你可能感兴趣的文章
学习webpack4 - 样式处理
查看>>
nextjs踩坑
查看>>
TiKV 源码解析系列文章(二)raft-rs proposal 示例情景分析
查看>>
【基础】小程序实现聊天气泡样式
查看>>
153. Find Minimum in Rotated Sorted Array
查看>>
Java程序员幽默爆笑锦集
查看>>
手机H5 web调试利器——WEINRE (WEb INspector REmote) 安卓手机
查看>>
LeetCode31.下一个排列 JavaScript
查看>>
47. Permutations II
查看>>
ElasticSearch重要概念及简单用法
查看>>
SpiderData 2019年2月20日 DApp数据排行榜
查看>>
==与===的区别
查看>>
浅析 Vue 2.6 中的 nextTick 方法
查看>>
【剑指offer】6.用两个栈实现队列
查看>>
webpack4使用笔记之plugin
查看>>
python多线程
查看>>
React 中的函数式思想
查看>>
让移动开发更轻松 闲鱼基于Flutter构建跨端APP应用实践
查看>>
Python爬虫 --- 2.3 Scrapy 框架的简单使用
查看>>
【每日一包0023】concat-stream
查看>>