Plan the sprint from the log
Start with the stand-up. Read your last log entry: it says what comes next.
Sort what is left into must and nice. A must-have is in the success criteria. A nice extra is not.
★RememberBuild every must-have first. A nice extra waits until every criterion works.
Join the parts
Parts that work alone can still break when they meet. Joining them is called integration.
score = 0
name = input("What is your name? ")
score = score + ask("101", 5)
score = score + ask("1000", 8)
# … 8 more questions …
print(name, "scored", score, "out of 10")
file = open("scores.txt", "a") # "a" adds to the end of the file
file.write(name + "," + str(score) + "\n")
file.close()!Watch outname + "," + score crashes, because score is a number. Turn it into text first with str(score).
After joining, run the whole program from start to end. Then test each part again.
The mid-point demo
Halfway through, show the project to another guild. It is not finished yet, and that is fine.
- Say the brief and the user in one sentence.
- Show what works, criterion by criterion.
- Say honestly what does not work yet.
- Listen. The other guild gives two stars and a wish.
★RememberWrite the feedback in your log. Decide as a guild what to change. You do not have to change everything.
e.g.Worked exampleOmar's save part worked alone. After joining, the program crashes on file.write(name + "," + score + "\n"). Why, and what is the fix?
- Read the error: 'can only concatenate str (not "int") to str'.
- Concatenate means join pieces of text together. Python will not join text and a number.
- In Omar's own test, he typed score = "7", which is text. After joining, score comes from ask(), which returns a number.
- Fix: write
str(score). It turns the number into text. - Run the whole program again. Check that scores.txt has a new line, like Ana,7.