Pair programming (Python implementation)

A, Github address: https: //github.com/nullcjm/mypage

Project partner: 3117004662 3117004648 Chen Junming Liang Zaihao

Two, PSP form:

PSP2.1

Personal Software Process Stages

Estimated time consuming (minutes)

The actual time-consuming (minutes)

Planning

plan

 30

 30

· Estimate

• Estimate how much time this task requires

 30

 30

Development

Develop

 800

840

· Analysis

· Needs analysis (including learning new technologies)

 120

100

· Design Spec

Generate design documents

 30

 30

· Design Review

· Design Review (and his colleagues reviewed the design documents)

 30

 30

· Coding Standard

· Code specifications (development of appropriate norms for the current development)

 20

 20

· Design

· Specific design

 60

 60

· Coding

· Specific coding

 480

 520

· Code Review

· Code Review

 30

 40

· Test

· Test (self-test, modify the code, submit modifications)

 30

 40

Reporting

report

 90

 90

· Test Report

· testing report

 40

 40

· Size Measurement

· Computing workload

 20

 30

· Postmortem & Process Improvement Plan

· Hindsight, and propose process improvement plan

 30

 20

total

 

 940

 960

 

Third, the design and implementation process:

 

Fourth, Code Description:

In the encounter to convert improper fractions to mixed numbers when it came to the circumstances that make us laugh and cry, perhaps two individuals was not already clear, even the most original use of Fraction forget. Used in generating the fractional expression stupid way, to generate the numerator and denominator, respectively, the integer part of a mixed fraction is obtained by rounding down the '//' operator, obtained by molecular moiety remainder operation, originally intended to use the same when judged right or wrong way to function, suddenly ignorant lived, I had wanted to submit expressions to answer the molecular denominator separated by coming out converted to a mixed number, and then compared with the generation of the correct answer (because the previous generation of the answer becomes the mixed numbers), I feel a lot of trouble. But then, through the most basic usage remind Fraction fraction of the numerator and denominator have separate functions (we two are really daft), know that after the conversion is actually very simple (in high spirits .jpg).

DEF change_fraction (S):
     "" " 
    converted to a mixed fraction score 
    : param s: Original Score 
    : return: mixed fraction 
    " "" 
    FRA = Fraction (S)
     IF fra.numerator% fra.denominator == 0: 
        FRA = int (fra.numerator / fra.denominator)
         return STR (FRA)
     elif fra.numerator> fra.denominator: 
        Integer = fra.numerator // fra.denominator 
        FRA = FRA - Integer
         return  " ' " .join ([STR (Integer) , str (FRA)])
     the else :
        return s

 

Five test run:

1. Generate ten thousand questions

2. Generate answers

3. Check right or wrong

4. Enter command

VI. Project Summary:

The pair programming harvested deal, two people collaborating to bring the power of 1 + 1> 2. They collaborate efficiency is much better than the individual, than their own Baidu, the two discussed or easier way.

True and false conversion of scores like a long time, the Internet has only to search the mathematical solution, then ask someone else, that the Fraction was to solve the problem. Project really is such a thing more people, the easier problem to solve.

Guess you like

Origin www.cnblogs.com/nullcjm/p/11686839.html