183
社区成员




The Link of Requirement of This Assignment | |
ruoyu Wang MU STU ID and FZU STU ID | 19104332 -- 831901214 |
haotian Lin MU STU ID and FZU STU ID | 19105738 -- 831901221 |
yanhan Zhang MU STU ID and FZU STU ID | 19105924 -- 831901302 |
Wei Liu MU STU ID and FZU STU ID | 19103832 -- 831901226 |
xingyu Ma MU STU ID and FZU STU ID | 19103875 -- 831901219 |
Github:https://github.com/3MarkAeolus10/LAB5
written it up front. Finally, an easy experiment,and multiplayer
MU LU
4.Problem collection and resolution
2.Open the file path displayed
3.Log in to your GitHub account for binding
<2> click SSH and GPGkey,and click NEW SSH KEY in the top right corner
<3>Paste in the previously obtained code into key
PSP Stages | Estimated Time/mins | Completed Time/mins |
Planning | 10 | 10 |
Time Estimation | - | - |
Development | - | - |
Requirement Analysis | 10 | 10 |
Design Documents | - | - |
Design Review | - | - |
Code Specification | 10 | 10 |
Specific Design | 30 | 30 |
Specific Coding | 30 | 30 |
Code Review | - | - |
Test | 10 | 10 |
Presentation | - | - |
Test Report | - | - |
Calculation Workload | - | - |
Summary&Improvement | 30 | 30 |
Total | 130 | 130 |
In the selection of software, the team had differences in the use of wechat applet, c++ and python coding. Finally, we asked the teaching assistant and explained that this experiment should not be implemented as a applet, but only in the console of the code. Python is easier to realize than c++ in generating random numbers and controlling the reserved digits of random numbers, so we finally choose python for coding.
We divide the task into judge grade and number of questions function and Grade1_2, Grade3_4, Grade5_6, judge right and wrong function and write fraction function. Finally, integrate in the main page. When we did the integration on the main page, we wanted to code using classes because we thought it would keep the code simple. However, the final written program does not fit the purpose of the experiment well. So we just code it in a generic way.
ruoyu Wang | code Grade3_4 function,Summary program, test program |
yanhan zhang | Prepare grade input, item quantity input, result judgment, result output procedure |
haotian Lin | code Grade5_6 function,write blog |
wei Liu |
code Grade1_2 function |
xingyu Ma | build Github Public warehouse |
The main problem we encountered in this experiment was the creation of the Github common repository, and since the tutorial hasn't been updated, there are some key parts we don't understand. We spent a lot of time here
Bind your local Git repository to Github
Copy the value of ssh.key (that is, open the following file (open with Notepad) and copy it)
Here mainly shows the fifth and sixth grade set the question part, and the result comparison, the result part of the code
def Grade56():
flag = random.randint(1, 4)
num1 = random.uniform(0, 1000)
num2 = random.uniform(0, 1000)
num1 = round(num1, 2)
num2 = round(num2, 2)
if (flag == 1):
print(num1, " + ", num2, " = ?")
sol = num1 + num2
elif (flag == 2):
while (num1 < num2):
num1 = random.uniform(0, 1000)
num2 = random.uniform(0, 1000)
num1 = round(num1, 2)
num2 = round(num2, 2)
print(num1, " - ", num2, " = ?")
sol = round(num1 - num2,2)
elif (flag == 3):
print(num1, " × ", num2, " = ?")
sol = num1 * num2
elif (flag == 4):
while (flag == 0):
num2 = random.uniform(0, 1000)
num2 = round(num2, 2)
print(num1, " ÷ ", num2, " = ?")
sol = round(num1 / num2 ,2)
return sol
def judge(right,sol):
answer = input('Please enter your answer: ')
if float(answer) == sol:
right = right + 1
return right
def score(right):
score = 100 * (right / n)
if score == 100:
print("End ! All right, that is great! Your score is 100.")
else:
print("End ! Wrong question. Your score is", score, ".")
Since this was the first group work, we divided the question into several modules after simple analysis. Because we were not familiar with the use of Git, it took us the longest time to build the warehouse. On the contrary, the code design was quickly completed under everyone's discussion. In this cooperation, we realized the power of a team. We got together to write code and asked each other what we didn't understand. The process was very efficient and quick.In my opinion, we can learn from each other, help each other and grow up together when we finish the homework in the form of group cooperation, which is probably the charm of group cooperation.