subject

I just started learning python last week and I'm still very new to everything. I'm completely stuck on question 2 of this CS61A free online course.. I've tried looking up solutions but when I enter the code and use their practice examples, I can never get the same answers as the practice examples used on the cs61a website where it explains the project. So far python is super challenging and I barely have any idea what I'm doing and this course is making me feel really dumb but I'm hoping its just my beginner levels and not my actual cognitive abilities...
Anyways the rules can be found on this page: https://cs61a. org/proj/hog/#problem-2-1-pt
Rules in particular for Free bacon (section i'm stuck on... Although I didn't get problem 1 without really having looked up the answers and still struggling to understand):
A player who chooses to roll zero dice scores points equal to ten minus the minimum of of the ones and tens digit of the opponent's score.
Example 1: The opponent has 13 points, and the current player chooses to roll zero dice. The minimum of 1 and 3 is 1, so the current player gains 10 - 1 = 9 points.
The code they start you off with for problem 2:
def free_bacon(score):
"""Return the points scored from rolling 0 dice (Free Bacon).
score: The opponent's current score.
"""
assert score < 100, 'The game should be over.'
# BEGIN PROBLEM 2
"*** YOUR CODE HERE ***"
# END PROBLEM 2

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
Which option allows you to view slides on the full computer screen?
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Perform an online search about the booting process of a computer and list all the steps
Answers: 2
You know the right answer?
I just started learning python last week and I'm still very new to everything. I'm completely stuck...
Questions
question
Mathematics, 19.05.2020 15:02
question
History, 19.05.2020 15:02
question
Mathematics, 19.05.2020 15:02
question
Physics, 19.05.2020 15:02
Questions on the website: 13722367