Little Turtle Python Video Sixth lecture (notes and after-school exercise answers)

Source: Internet
Author: User
Tags arithmetic operators logical operators

Today we mainly learn the commonly used operators, such as arithmetic operators, comparison operators, logical operators, and so on, given that the courseware is doing too well (praise the Little Turtle ~ ~ ~ ~). I paste the picture directly (in fact, I am lazy)

noun explanation

Stitching

This is the first section of the study of a noun, because of their lazy, did not write, add here. Stitching, in fact, is to connect two strings together, not the other, note the following example of the difference

Finally, highlight the next version of the issue, with today's program (to run in version three)

temp = str (input ('Please enter a year:')) whileNot temp.isdigit (): Temp= Input ("Sorry, your input is wrong, please enter an integer:") Year=int(temp)ifyear/ -==int(year/ -): Print (temp+'is a leap year! ')Else:    if(year/4==int(year/4) and (year/ -!=int(year/ -): Print (temp+'is a leap year! ')    Else: Print (temp+'not a leap year! ')

Little Turtle Python Video Sixth lecture (notes and after-school exercise answers)

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.