当前位置:网站首页>Example 046: Breaking the Cycle
Example 046: Breaking the Cycle
2022-08-10 03:32:00 【lazily】
Title:Squaring the input number, if the square is less than 50, exit.
Program Analysis:None
Instance 046: Breaking the loop break and continue usage
I. Code
while True:try:n = float(input('Enter a number: '))except:print('input error')continuedn = n**2print('The square is:', dn)if dn < 50:print('The square is less than 50, exit')breakSecond, running results

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓LazyXiaofan sincerely invites you to click below to learn and discuss together↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
边栏推荐
- 2022.8.8考试区域链接(district)题解
- OpenCV图像处理学习二,图像掩膜处理
- T5:Text-toText Transfer Transformer
- What is a Cross-Site Request Forgery (CSRF) attack?How to defend?
- The Evolutionary History of the "Double Gun" Trojan Horse Virus
- MySQL:日志系统介绍 | 错误日志 | 查询日志 | 二进制日志:bin-log数据恢复实践 | 慢日志查询
- 【QT】QT项目:自制Wireshark
- 2022.8.9考试平衡的余数--1000题解
- [Kali Security Penetration Testing Practice Tutorial] Chapter 6 Password Attack
- Algorithm and voice dialogue direction interview question bank
猜你喜欢
随机推荐
16. 最接近的三数之和
Arcgis进阶篇(1)——安装Arcgis Enterprise,创建sde库
OpenCV图像处理学习四,像素的读写操作和图像反差函数操作
官宣出自己的博客了
T5:Text-toText Transfer Transformer
T5: Text-to-Text Transfer Transformer
mysql -sql编程
SQLserver adds a judgment
MySQL: Introduction to Logging System | Error Log | Query Log | Binary Log: Bin-log Data Recovery Practice | Slow Log Query
GDB之指令基础参数
控制台中查看莫格命令的详细信息
2022.8.8考试游记总结
idea 删除文件空行
如何编写一份优质的测试用例?
【图像分类】2022-ConvMixer ICLR
中级xss绕过【xss Game】
【二叉树-中等】1261. 在受污染的二叉树中查找元素
LeetCode每日两题01:移动零 (均1200道)方法:双指针
Go语言JSON文件的读写操作
量化交易策略介绍及应用市值中性化选股









![[Kali Security Penetration Testing Practice Course] Chapter 9 Wireless Network Penetration](/img/7d/c621680ac73e2987f023a2e98e01df.png)