Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python bricks
#1
We want to make a row of bricks that is goal inches long. We have a number of small bricks (1 inch each) and big bricks (5 inches each). Return True if it is possible to make the goal by choosing from the given bricks. This is a little harder than it looks and can be done without any loops. See also: Introduction to MakeBricks


make_bricks(3, 1, 8) → True
make_bricks(3, 1, 9) → False
make_bricks(3, 2, 10) → True
Reply
#2
What have you tried? Post your attempt at solving the task (in Python code tags) and errors if you get them (in error tags). You can find help on that here. We will help you correct mistakes and point you in right direction, but not write the code for you.
Reply
#3
What have you tried? Show us your code in python tags. If you get an exception, post the full traceback in error tags. Ask specific questions.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#4
This looks like you literally just copy/pasted from your homework. Put some effort in.

We're here to help if you need it, we're not here to just do it for you.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020