Discover learn python 3 hard way review, include the articles, news, trends, analysis and practical advice about learn python 3 hard way review on alibabacloud.com
Now it is time to review python keywords and symbols. The following lists some important python keywords and symbols.
Based on your memory, first write down the functions of these keywords, and then go online to find out their actual usage. Some of them may be difficult to find, but you should keep trying.
Write down the cards that you mistakenly remember, and wr
FalseWhat is 3 + 2? 5What is 5-7? -2Oh, that's why it's False.How about some more.Is it greater? TrueIs it greatet or equal? TrueIs it less or equal? FalseRoot @ he-desktop :~ /Mystuff #
Extra score exercise1. Add a comment to each line.# Percentage indicates the remainder.Print "Roosters", 100-25*3% 4
2. Like exercise (0), input python in Terminal, run
Recently viewed: stupid ways to learn python (learn python the hard way)Contents:
Translator Preface
The stupid method is more simple
Exercise 0: Preparing for work
Exercise 1: First program
Exercise 2: Annotations an
We have already learned about half of it, and the lower part is more interesting. We will learn logical judgment.
Before learning in the lower half, we should first perform a test. This test will be a bit difficult and we need to modify others' code. As a programmer, it is inevitable to modify other people's code, and these people often think that their code is perfect.
These people are stupid and do not care about others' feelings. Good programmers a
1.Windows under Installationhttps://www.python.org/downloads/download the appropriate version for installationNote: Add the Python installation path to the path path of the system environment variable to enter Python into the python environment under the command-line window 2.Linux installation tar.bz form TAR-ZJVF Compressed package c. Enter the u
use ''To connect stuff, join ('', stuff) is to use ''and stuff to call the join method
3. check some object-oriented programming information on the Internet. I used to do the same. Don't worry. I will understand it later.
4. Check the usage of class in python. Do not look at the usage of class in other languages. This will only confuse you.
5. What is the relationship between dir (something) and something
honey.The fat bear is in front if another door.How are you going to move the bear?> Taunt bearThe bear has moved from the door. you can go through it now.> Taunt bearI got no idea what that means.> Open doorThis room is full of fold. How much do you take?> 4Man, learn to type a number. Good job!Root @ he-desktop :~ /Mystuff # python ex35.pyYou are in a dark room.There is a door to your right and left.Which
Now we enter more variables and print them. We usually use "" to refer to strings.
Strings are quite convenient. In practice, we will learn how to create strings containing variables. There is a special way to insert a variable into a string, which is equivalent to telling Python: "Hey, this is a formatted string. Put the variable here ."
Enter the following prog
In the following example, we will pass a variable to the script. Do you know why you enter python ex13.py to execute the ex13.py file? The command "ex13.py" is actually a "parameter". Let's write a script that can accept parameters.[Python]1. from sys import argv2.3.4. script, first, second, third = argv5.6.7. print "The script is called:", script8. print "Your first variable is:", first9. print "Your secon
Next we will do some interesting things. if you follow the progress, you will find that you can use the if statement and Boolean expression to do a lot of things.
In any case, the program will do some repetitive tasks. Next we will print a list variable with a for loop. During this exercise, you must understand their meanings and functions.
Before using the for loop, we need to save the value of the loop. The best way is to use a list. The list is the
Next, we will learn the if statement and enter the following code to ensure proper running.[Python]People = 20Cats = 30Dogs = 15If people Print "Too success cats! The world is doomed! "If people> cats:Print "Not found cats! The world is saved! "If people Print "The world is drooled on! "If people> dogs:Print "The world is dry! "Dogs + = 5If people> = dogs:Print "People are greater than or equal to dogs ."If
We have learned printing and mathematical computation. Next we will learn variables. in the program, variables are a name, which makes it easier for us to remember.
If you are overwhelmed by the following exercises, remember the methods we taught before and find different points. Pay attention to the details:1. Write comments for each line of code.2. Read the code in turn.3. Read your code.
[
Exercise: Your first website Exercise: getting input from the browser Exercise: Create your Web game Select a project, read through its documentation and easy tutorials. During the reading process, write the code in the document yourself and let them operateYes. I learned this way, in fact, every programmer is doing so. After reading the tutorials and documentation, try writing something.Come out. Write anything, even if it is written by others can b
Review 6 sessions (December 3)2.5/2.6 module Use2.7 Object-oriented introductionProperties of Class 2.8Method of Class 2.9Built-in Methods for class 3.0Inheritance of the 3.1/3.2 classNotes:Module:Modules are the basic way to organize your code in Python.A python script can run on its own, or it can be imported into an
Ref: http://net.tutsplus.com/tutorials/the-best-way-to-learn-python/ postMark Dunne
Python is more popular than ever, and is being used everywhere from back-endWeb servers, to front-end game development, and everything in. python is a true general purpose language and is qu
This is a technical tutorial, sincerely will use very simple words to express their meaning, as long as you can read and understand, you can learn knowledge. The purpose of this tutorial is to let every friend who has read these words remember a word: if love can make things easier, then let it be easy! The way to see this tutorial is slow! Slowly, as a product of a woman, a cup of tea, you will find many b
) returns an int of type 4). Input () handles what you enter as Python code, which can be a security issue. Unless there is a special need for input (), it is generally recommended to use raw_input () to interact with the user. Note: Python3 input () receives the STR type by default. x = Int (raw_input ()) Converts the user input string int () to an integer raw_input () in parentheses to enclose the hint message y = raw_input ("Name?") 7.
it is very helpful.
3. since IT is an IT company, there is little basic knowledge, such as a variety of classic algorithms, OS, and databases.
4. Python is just a language. What truly reflects the level is computing thinking.
In addition, you can search for the Python Web framework on Zhihu and learn a lot about it.
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.