2016/09/15

Source: Internet
Author: User

1. Python Video

B. Decorative Device

B-1 Decorator Flow Analysis

# Interpreter Step: Def outer (func): # 1. Explain outer, do not perform internal def inner (): # 3. Explanation Innerprint (' before ') # 5.1func () # 5.2 point to Old F1print (' after ') # 5.4 Return inner# 4. Returns the inner function to F1 (if inner parentheses, the inner function is executed first) #   then the F1 function only wants to inner the function. If you call F1, execute the inner function, example * @ + function name # function: # 1. Automate the execution of the outer function and pass the following function name F1 as a parameter. Re-assigns the return value of the outer function to f1@outer# 2. Interpretation, execution Outerdef F1 () :p rint (' F1 ') # 5.3

  

4th Week Assignment

2. MOOC-complete with Python data-to-play

Job: Find the nth Moenissen number. P is a prime and M is a prime number and satisfies the equation m=2**p-1, which is called M Moenissen.

#!usr/bin/env python#-*-coding:utf-8-*-# author:wayne zhongdef is_prime (num): For I in range (2, num): If num% i = = 0:BR Eakelse:return truedef Monisen (NO): MNS = []x = 2while true:if is_prime (x) and Is_prime (2 * * x-1): num = 2**x-1mns.appen D (NUM) If Len (MNS) > no:breakelse:x + = 1else:x + 1#print (MNS) return Mns[no-1]print (Monisen (int (input)))

3. MOOC-Database technology and application

1th Week: Into the database

*******************************************************************************

4. MOOC Timetable

  

2016/09/15

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: info-contact@alibabacloud.com 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.