xiaoyouzi11 ·¢±íÓÚ 2021-4-19 21:03:29

break

breakÓÐɶÓÃ

ÊÁ×Ó±ýͬѧ ·¢±íÓÚ 2021-4-19 21:07:34

±¾Ìû×îºóÓÉ ÊÁ×Ó±ýͬѧ ÓÚ 2021-4-19 21:14 ±à¼­

Ìø³ö±¾ÂÖÑ­»·
¾ÙÀý: ÓÐÒ»³¤´®×Ö·û´®,ÎÒÏëÖªµÀÀïÃæÓÐûÓÐyÕâ¸ö×Öĸ
s = 'ffffjsihciloveyouhisjniisn'
Èç¹ûÕâôд:for i in s:
   if i == 'y':
          print('ÓÐY!')
µ±È»¿ÉÒÔÂú×ãÐèÒª,¿ÉÊdzÌÐòÕÒµ½yÖ®ºó»¹²»ÄÜÁ¢¿ÌÍ£Ö¹,Òª¼ÌÐøÅÜ,Ö±µ½×Ö·û´®ÅªÍê
ÕâÑù»áÔì³ÉÀË·Ñ
for i in s:
   if i == 'y':
          print('ÓÐY!')
          break
ÕâÑùдµÄ»°µ±¿´µ½yÊǾͻáÁ¢¿ÌÍ£Ö¹,´ïµ½ÁËÐèÇó»¹½ÚÊ¡ÁËʱ¼ä,Æñ²»ÃÀÔÕ?{:10_277:}

Ф-Ф ·¢±íÓÚ 2021-4-19 21:08:56

àÅ Ò²¾ÍÊÇÍ˳öÑ­»·

z5560636 ·¢±íÓÚ 2021-4-20 09:46:25

ºÜÓÐÓ㬴ó¶àÊýµÃʱºò£¬¶¼ÊÇÓÃÔÚ²ÎÊý¿ØÖÆÉÏ¡£

ÏÖʵÂß¼­¾ÙÀý£¬±¨Êý£¬1-1000£¬¸øÄã·ÖÅäµÃÈÎÎñÊDZ¨Êý 1 - 10£¬µ±Äã´Ó1µ½10ÊýÍêºó£¬½»¸øÏÂһλͬѧ¼ÌÐø±¨ÊýµÃʱºò£¬ÄãÃÇÕâÖмäµÄ½»½Ó£¬¼´ÄãµÄÍ£Ö¹£¬¾ÍÊÇÒ»¸öbreak(ÕâÖ»ÊÇÒ»¸ö±ãÓÚÀí½âµÄÂß¼­¾ÙÀý˼·)¡£

UairÃÎÔÆ ·¢±íÓÚ 2021-4-20 19:18:55

˳±ã×ÁÄ¥Ò»ÏÂcontinue{:5_97:}

p,v,k=int(input("Ñ­»·´ÎÊý:")),int(input("µÚ¼¸´ÎÍ˳ö |ÎÞÏÞÑ­»·|:")),int(input("µÚ¼¸´Î´òÓ¡*ºÅ²¢ÎÞÏÞÑ­»·:"))
r=p
while(1):
    print("Ö´ÐÐÖУ¡µÚ",r-p+1,"´ÎÖ´ÐУ¡£¡£¡")
    if p==r-k+1:
      print("***** ",k," *****")
      continue
    if p==r-v+1:break
    p-=1

˽¤Ï¤ê ·¢±íÓÚ 2021-4-20 20:56:07

Ìø³öÑ­»·

xiaoyouzi11 ·¢±íÓÚ 2021-4-20 21:36:25

UairÃÎÔÆ ·¢±íÓÚ 2021-4-20 19:18
˳±ã×ÁÄ¥Ò»ÏÂcontinue

p,v,k=int(input("Ñ­»·´ÎÊý:")),int(input("µÚ¼¸´ÎÍ˳ö |ÎÞÏÞÑ­»·|:") ...

ßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀ

UairÃÎÔÆ ·¢±íÓÚ 2021-4-21 13:45:48

xiaoyouzi11 ·¢±íÓÚ 2021-4-20 21:36
ßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀßÀ

https://www.runoob.com/python3/python3-loop.html

{:5_91:} ²ËÄñ½Ì³ÌÓÐÄãÏëÒªµÄ´ð°¸

xiaoyouzi11 ·¢±íÓÚ 2021-4-22 21:35:17

˽¤Ï¤ê ·¢±íÓÚ 2021-4-20 20:56
Ìø³öÑ­»·

ÄÇcontinueÄØ

xiaoyouzi11 ·¢±íÓÚ 2021-4-22 21:40:36

ÊÁ×Ó±ýͬѧ ·¢±íÓÚ 2021-4-19 21:07
Ìø³ö±¾ÂÖÑ­»·
¾ÙÀý: ÓÐÒ»³¤´®×Ö·û´®,ÎÒÏëÖªµÀÀïÃæÓÐûÓÐyÕâ¸ö×Öĸ



ÎҵIJÙ×÷£º
for i in s:
if i==y:
break

print('ÓÐy!')

˽¤Ï¤ê ·¢±íÓÚ 2021-4-22 22:46:56

xiaoyouzi11 ·¢±íÓÚ 2021-4-22 21:35
ÄÇcontinueÄØ

breakÊÇÍ˳öÑ­»·£¬²»ÔÚÑ­»·ÁË
continueÊÇÖ»ÊÇÍ˳ö±¾´ÎÑ­»·

xiaoyouzi11 ·¢±íÓÚ 2021-4-23 21:46:45

ÊÁ×Ó±ýͬѧ ·¢±íÓÚ 2021-4-19 21:07
Ìø³ö±¾ÂÖÑ­»·
¾ÙÀý: ÓÐÒ»³¤´®×Ö·û´®,ÎÒÏëÖªµÀÀïÃæÓÐûÓÐyÕâ¸ö×Öĸ



лл

xiaoyouzi11 ·¢±íÓÚ 2021-5-25 21:39:04

˽¤Ï¤ê ·¢±íÓÚ 2021-4-22 22:46
breakÊÇÍ˳öÑ­»·£¬²»ÔÚÑ­»·ÁË
continueÊÇÖ»ÊÇÍ˳ö±¾´ÎÑ­»·

¾ÙÀý×È

˽¤Ï¤ê ·¢±íÓÚ 2021-5-26 12:29:01

xiaoyouzi11 ·¢±íÓÚ 2021-5-25 21:39
¾ÙÀý×È

https://blog.csdn.net/weixin_39899691/article/details/110167762?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-0&spm=1001.2101.3001.4242
Ò³: [1]
²é¿´ÍêÕû°æ±¾: break