为什么这不归还什么? [英] Why is this not returning anything?

查看:71
本文介绍了为什么这不归还什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

x = 0
>>> while x >= 20:
	print(x)
	x -=2





我尝试过:



dasda sdas da asd asd asd as das das asdasd



What I have tried:

dasda sdas da asd asd asd asd as das das asdasd

推荐答案

简单:X不大于或者等于20.所以循环体永远不会被执行。

试试这个:

Simple: X is not greater than or equal to 20. So the loop body is never executed.
Try this:
x = 20
while x >= 0:
    print(x)
    x -=2


这篇关于为什么这不归还什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆