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, 22.06.2019 09:50
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
question
Computers and Technology, 22.06.2019 10:30
Think about a recent customer service experience - either positive or negative. write a brief summary of that experience. now think about those four characteristics we look for in customer service representatives. how did the representative in your example stack up? write down your answer and give specific examples.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
Which are examples of note-taking tools? check all that recording devices sticky notes digital highlighters paper flags highlighting pens digital displays digital flags
Answers: 1
question
Computers and Technology, 23.06.2019 21:40
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
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
Chemistry, 03.12.2020 07:50
question
Mathematics, 03.12.2020 07:50
question
Mathematics, 03.12.2020 07:50
Questions on the website: 13722367