project 完成 Phase 3: Strategies In the third phase, you will experiment with ways to improve upon the basic strategy of always rolling a fixed number of dice. First, you need to develop some tools to evaluate strategies. Problem 8 unlock时,注意Sow Sad规则。 defmake_averaged(original_function...
Project HogThere are too many unlock cases!Lambda Expressions will be soon talked in the 1.6 Lecture.# The use of lambda f=lambda a,b:a*b # Is the same as def lam(a,b): return a*b QQuestion 1 > Suite 1 > Case 5>>> from hog import * >>> counted_dice = make_test_dice(4...
"cal/cs61a/fa23/lab09", "src": [ "lab09.py" ], "tests": { "lab*.py": "doctest", "tests/*.py": "ok_test" }, "default_tests": [ "trees-wwpd", "cumulative_mul", "prune_small" ], "protocols": [ "restore", "file_contents", "unlock", "grading", "analytics", "backu...
unlockpython ok -q 06 -u --local 注意!!!没有逗号 Problem 6 由于每轮都要输出commentary,不适合使用continue,把who = next_player(who)放到if-else语句里了。 defplay(strategy0, strategy1, score0=0, score1=0, dice=six_sided, goal=GOAL_SCORE, say=silence):"""Simulate a game and return t...