Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize cycle Control in python

Shulou Source: shulou.com Published: 2022-06-02 02:17:01 11月23日 Update

This article mainly introduces python how to achieve loop control, the article introduces in great detail, has a certain reference value, interested friends must read it!

Endless cycle

# / usr/bin/env pythoninput_number=19while True: # = = > Infinite Loop number=int (input ("please input your number:")) # = = > Note that python3.0 defaults to entering a string Need int conversion if number = = input_number: print ("the number you put is true") break # = > end the loop elif number > input_number: print ("the number you put is big") else: print ("the number you put is small") these are all the contents of the article "how python implements Loop Control" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Loops controls content articles values interests characters strings guys buddies more conditions knowledge industry information information channels channels references help input Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology OPPO Reno Redmi vpn Microsoft