First of all: I am now the Python language beginner, if any crossing feel wrong, please criticize the guidance, let me grow from it, thank you!
The Python language is much less specific than the C, C #, and Java languages, for example, in the Python loop statement, which is for I in rang (number), which represents how many loops, but the C language must declare the variable in the declaration area, then the for (i=0;i <number;i++), and then loop through the curly braces, but Python is forced to indent, which reduces the lack of parentheses, but in some ways it makes the program more readable.
I learn the Python language from the most basic symbols, frameworks, and run structures.
Below I want to write a simple Python language programming in order to attract the big crossing and the great God in my comment area to attach to me the N-Python script let me learn:
Guess Age Game
Age=22
Counter=0
For I in range (10):
Print (i)
Print ("-->counter", counter)
If counter<3:
guess_num = Int (input ("input"-you guess number if you see my Picture: "))
if Guess_num = = Age:
Print ("Congratulation you! That's right ")
Continue
Elif Guess_num>age:
Print ("You guess wrong, I advice can write a little number")
Else
Print ("You guess wrong, I think can write a big number")
Else
Print ("Stupid man!do do want to need another choice?" ")
if (continue_confirm = = ' Y ')
Counter=0
Continue
Else
Print ("Stupid man!good Bye")
Break
Counter+=1
The code is relatively simple, the only purpose is to ask the big guys to drop me a face, let me in your dump my face at the same time, and then progress, and strive to be like you write a better Python program.
If you crossing not be able to give me the evaluation, I wrote on the blog, and then the process of blogging to grow.
This article is from the "11516031" blog, please be sure to keep this source http://11526031.blog.51cto.com/11516031/1978745
Python Base language