Python Second study notes

Source: Internet
Author: User
Tags ff7

1. How many BIF does the Python3 offer with the method of teaching the small turtle in class?

68 X 2. in Python's view : ' FISHC ' and ' FISHC ' ? Not the same,because python is a "sensitive little girl ", so don't try to deceive her, on python ForFISHC and FisHC are completely different two names, so be sure to be careful when programming. no APython will help resolve problems that may arise, such as when an identifier has been assigned (or You remember,The little Turtle said in class that Python variables are not declared before they can be used in code to make Usean unassigned identifier can cause a run-time error when used directly, so you'll soon be able to This issue is now in question. 3. look at the Little Turtle , Python < Span class= "_ _2" > < What is most important in strong>? Do you agree? < Span class= "_ _2" > < Span class= "_ _2" > Indentation is very important!!! If you enter the colon ":" in the correct location ,IDLE will indent the next line automatically! 4. "=" and "= =" appear in the example of this lesson , they represent different meanings, you are in the process of programming will accidentally write "= =" in the wrong " ="? Is there a good way to solve this problem ? C Language, if if (c = = 1) is written if (c = 1), the program does not follow the programmer's original /c18>Purpose to execute, but inPython Here, sorry, not working, grammatical errors! Python forbid Xuif condition is assigned , so if C = 1: Error! 5. Have you ever heard of the word "splicing" ? In some programming languages,we can "add" two strings together, such as:' I ' + ' love ' + ' FISHC ' Will get' ILOVEFISHC ', in Python , this is called stitching strings. 0. Write the, ask the user to enter a name and print " Hello, name!" "
temp = input ("What's Your Name:") print ("Hello," +temp+ "!")
It 's supposed to be a result map. hahaha ~ ~ 1. Write the requires the user to enter between 1 and the number and judge, the input meets the requirements print " Your sister is very beautiful ", do not meet the requirements of printing "You are so ugly "
temp = input ("You enter a number between the 1~100:") numbers = Int (temp) If 1 <= number <=100:    print ("Then you're not very good ~") Else:    print (" Goodbye, You ") print (" GG ")

The text in this question did not write in accordance with the requirements of haha, and finally added a GG is to show the game is over ~ ~ ~

Last result diagram ~

Today's mission is over.

Python Second study notes

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: 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.