Want to know coursera full stack web development review? we have a huge selection of coursera full stack web development review information on alibabacloud.com
{Font-size:20px; color:red; } /* Select the last element */Div ul Li:last-child{Font-size:20px; Color:yellow; } /* Select the currently specified element value starting at 1 */Div ul Li:nth-child (3) {font-size:30px; Color:purple; } /*n means check all, this must be N, from 0 to 0 is not selected */Div ul Li:nth-Child (n) {font-size:40px; color:red; } /* even * *Div ul Li:nth-Child (2n) {font-size:50px; Color:
19. Kill the host. The following information on the host revenue, as required, to complete the appropriate operation:(1) Calculate the average return value of the anchorsum = 0 for in zhubo.values (): + =Iprint(round (Sum/len ( Zhubo)))(2) to kill the host with less than average income dic1={} # Create an empty dictionary to store people less than the average for i,j in zhubo.items (): # loop anchor dictionary if j# below the mean condition dic1[i]=j # People below the mean a
24. File A1.txt content (note that the spaces in each line are not the same, you need to handle the space)Number of department number average age remark1 Python 30 26 single Dog2 Linux 26 30 no objects3 Operations Department 20 24 more girlsThrough the code, build it into this type of data:Li = []ImportRewith Open ('T4','R', encoding='Utf-8') as F:first= Re.sub (r"\s{2,}"," ", F.readline (). Strip ()) first= First.split (' ') #print (first) forIinchf.readlines (): DiC={} i= Re.sub (r"\s{2
Tag: Col key value to RET UNC data type call int return python7. This function receives only one parameter and this parameter must be a list data type, and the functionality that is done is to return a dictionary to the caller, the dictionary's key value pair for this list index and the corresponding element. For example, the incoming list is: [11,22,33] Returns a dictionary of {0:11,1:22,2:33}.L2 = [11,22,33]def Func8 (L1): = {} for in Range ( Len (L1)): = l1[i] return dicpri
There are two basic output statements in PHP, Echo and printWhat's the difference between these two things?echo can output one or more characters at a time:Echo "This is a", "string,", "used", "multiple", "parameter." ";Like this, there is no problem with the output.The result of the output is: This is a string that uses more than one parameterThen echo's output is not wrapped, and if you need to wrap it, you can add it later Echo "This is a", "string,", "used", "multiple", "parameter." You can
can improve compatibility3.1 Json.dumps () Import jsondic={'Alex':'+ '# Note the JSON-type string , all in double quotes, at which point the single quote a=json.dumps (DIC)print(a) {"Alex " " - "} # automatically outputs into double quotes, and is compatible with each platformThere is a shortcut, Json.dump (' Sjah ', f)The former is the data that needs to be written, and the latter is the file to be written, which is relatively fast3.2 Json.loads ()Take the JSON type string out, note that i
" This time triggered the new action, we want to record this behavior, if it is only recorded "Gxqsd a new role" that obviously he is a bit like the message log, but it can not be used for historical records. So the most important thing to do as a behavior log is to record the changes in the data. So there's a new role for GXQSD, and the right approach should be to store the new role entity information.Next, a simple diagram is used to describe the relationship between database tables.We define
Tag:slowfriend key value gitsub asc Replace string dea$$ What to learn today: 1. Basic data type initial: int: for calculation. STR: Used to store a small amount of data such as: ' Alex ', ' 123 ': Bool:true, Falselist: (list): The inside can put a variety of data, can store a lot of data, easy to manipulate the format of the list is: [' name ', true,[] ...] Tuple: (tuples, also called read-only lists) the format of tuple is: (' name ', true,[] ... Dict: (dictionary): stores a large number of re
First, the basic knowledge
There are two ways to run Python:
The first is run through interactive operation, through "start", "All Programs", "python3.x", "IDLE".
The second is that we write the Python file double-click Run.
Help system for Python ()
We enter help () in interactive mode, enter the function name you want to query.
If you want to exit from the help mode into interactive mode, simply type in assist () after help>.II. Basic data typesThird,
list be traversed with the __next__ methodL2 = [1, 2, 3, 4, 5, 6, 7, 8]l2_obj = l2.__iter__ () #1. Convert an iterative object to an iterator while True: try: i = l2_obj.__next__ () #内部使用__n Ext__ Method Value print (i) except Exception: #运用了异常处理去处理报错 break Try inside the code, there is an error, will not prompt red textException can receive all the error, indicating the error when, how to deal with, here directly use Breck jump out of the loopInterview questions:Use
string (for example, S=u ' forest '), it requests a new memory address and then stores the ' Forest ' in Unicode format in the new memory space, so s can only encode and cannot be decodeS=u ' Forest 'Print repr (s) #u ' \u6797 'Print type (s) ## s.decode (' Utf-8 ') #报错, S is Unicode, so you can only encodeS.encode (' Utf-8 ')For data in Unicode format, no matter how it is printed, it is not garbled.The string in python3 and the U ' string ' in Python2 are Unicode, so printing is not garbled an
, **kwargs) return obj# object parentheses will execute __call__ method class Foo (MyType (' Zcc '), (object,) , {})): #MyType (' Zcc ', (object,), {}) is equivalent to class ZCC (object):p, that is, creating a Zcc class user = ' Haiyan ' age = 18obj = Foo () # Way Three Class MyType (type): def __init__ (self, *args, **kwargs): print ("SSSs") super (MyType, self). __init__ (*args, **kwargs) Def __call__ (CLS, *args, **kwargs): v = dir (cls) obj = Super (MyType,
Whlie Condition # (when the condition is true) #break force terminate loop: #continue jump out of the current loop:Print ("num") # (Output num)Cases:Output 1 to 100 evennum = 1Whlie Num If num%2 = = 0:Print ("num")Num+=1 Cases:Yonghu = 1093166587Mima = 123456789While True:AA = Int (input ("User name:"))bb = Int (Input ("Password:"))if AA = = Yonghu:Print ("Welcome to this page")Break # break terminates the loop;ElsePrint ("Input error")Print ("")Example: #嵌套循环:height = Int (input ("Height:"))wi
There are three ways to create CSS, namelyExternal style sheetInternal style sheetInline style sheetThe external style sheet, as its name implies, is to separate the HTML file from the CSS file, forming two separate files, and CSS files ending with a. css.We can declare in the head of the HTML which CSS file the HTML file is using, as follows: Head > rel= "stylesheet" type= "text/css" href= "Mystyle.css" >head>Use this method to refer to an external CSS.The internal style sheet is the HTML
used in the vertical and horizontal navigation bars.To make the list different from the surrounding style, we add a background color to the list and set the width.ul { list-style-type: none; margin: 0; padding: 0; width: 200px; background-color: #f1f1f1;}This is how the navigation bar works after the setup is complete.But we feel that this link is still too crowded. Add some height clearance to the link.The first thing we need to do when we increase the spacing is to turn So
How to make a domain access to a website you create on a windows+wamp environmentStep 1In the Wamp installation directory, such as C:\wamp64\www\, create your own site Directory PEStep 2Right-click the Wamp icon to open VirtualHost sub-menu in Wamp settings.After opening virtualhost sub-menu this option will play a small green √ in front ofStep 3Open the native localhost page, and then under the localhost page, Add a Virtual HostThis option means adding a virtual host. Click to enter settings.Th
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.