当前位置:网站首页>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.9考试排列变换--1200题解
- Robust Real-time LiDAR-inertial Initialization(实时鲁棒的LiDAR惯性初始化)论文学习
- 2022.8.9 Exam Travel Summary
- 深度学习(五) CNN卷积神经网络
- GDB之指令基础参数
- “双枪”木马病毒的进化史
- 【Kali安全渗透测试实践教程】第7章 权限提升
- 【语义分割】2022-HRViT CVPR
- MySQL: Introduction to Logging System | Error Log | Query Log | Binary Log: Bin-log Data Recovery Practice | Slow Log Query
- Write a drop-down refresh component
猜你喜欢
随机推荐
Screen 拆分屏幕
论旅行之收获
[8.8] Code Source - [Non-falling subarray game] [Longest rising subsequence count (Bonus)] [Substring (data enhanced version)]
LeetCode每日两题01:移动零 (均1200道)方法:双指针
16. 最接近的三数之和
2022.8.8 Exam questions for photographer Lao Ma (photographer)
OpenCV图像处理学习四,像素的读写操作和图像反差函数操作
Excel Advanced Drawing Skills 100 Lectures (23) - Countdown Counting in Excel
ArcGIS Advanced (1) - Install ArcGIS Enterprise and create an sde library
【二叉树-困难】124. 二叉树中的最大路径和
mysql -sql编程
【8.8】代码源 - 【不降子数组游戏】【最长上升子序列计数(Bonus)】【子串(数据加强版)】
781. 森林中的兔子
SQLserver加个判断
从滑动标尺模型看企业网络安全能力评估与建设
深度学习(五) CNN卷积神经网络
【红队】ATT&CK - 自启动 - 注册表运行键、启动文件夹
数组(一)
Open3D 泊松盘网格采样
xss的DOMPurify过滤框架:一个循环问题以及两个循环问题





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



