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