Mentality ready
Programming is a skill, it can be said that a craft. Like calligraphy, paintings, musical instruments, sculptures and other skillful artistry behind the repeated practice certainly paid a long time. Limitless world of programming, keep a lesson to learn the fear mentality, take seriously each line of code written, even every character. He packed his attitude toward the world of programming departure.
How to deepen the impression of a knowledge point, the best way is to write your own code to achieve it again. If you still do not know, then do it again. So no matter what you use the tutorial, please send a column which shows all the code input and run on your computer.
Basic
1 Print
# Print Print Print ( ' Hello ' ) # print string Print ( ' World ' ) Print (. 1 ) to print an integer # Print (3.14 ) # printing float
Print (3E + 30 ) # Integer printing Print (. 1 + 2 * 3 ) # printing operation based Print (2>. 5) Boolean Print #
2, input
# The INPUT () Print ( ' the Who do you of Think the I AM? ' ) # Print string the INPUT () # wait for your input Print ( ' Oh, yes! ' ) # Print string
3, variable
Variables, '=' the value of the variable action is given the right to the left.
# Variable is the amount of change. Give it a name, and give it a value name = ' Cros ' myVar = 123 . Price = 5.99 visible = True # with the output of a print "variable" name = ' Cros ' print (name) A = 123 print (A) A = ' Hi ' Print (a) # calculated value: value =. 3. 3 * Print (value) value = 2 <. 5 Print (value) # may be INPUT () name = INPUT () Print name