An odd number within 100 of the job.

Source: Internet
Author: User

Ideas:

    • First, 1 to 100 of the number, output.
    • Use "%" to get the remainder of the value (0 or 1).

Start with your own approach:

1 s1 = 12 while s1<101:3     print(S1)4     S1 + = 15if s1% 2 = = 0; 6     Print (S1) 7      Break
5th line error. If syntax uses Error!
After watching the video, modify the code
S1 = 1 while s1<101:    = s1% 2    if s2 = =1        :print(S1)     Else:        pass #这里必须要定义, otherwise syntax error.     

An odd number within 100 of the job.

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.