Python Learning fifth day flow control branch if and loop while

Source: Internet
Author: User
Tags terminates

All the logical structures are organized around branches and loops, such as login registration, payment success, and so on, with branching if usage and while usage

If age>30:

Print ("www.96net.com.cn")

Else

Print ("www.dc3688.com")

If score>90:

Print ("good")

Elif score>70 and score<90:

Print ("G")

Else

Print ("false")

While usage tells, output 1-100 numbers

Count=1

While count<100

Print (count)

Count+=1

While mates break and continue use

Break terminates this cycle, continue terminates this cycle and continues the next cycle

While ... Else ........ ....... Usage

While

............

Else

............

Python Learning fifth day flow control branch if and loop while

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.