you can’t use a specific number because it needs to work with any rectangle. You used something to check if the width of the rectangle is higher than 50 tho, why can’t you use the same here?
self.width you mean? where would i put it here tho? and why
do you understand that get_picture
should return a rectangle of asterisks?
like, if your rectangle has width 4 and height 2, it should be
****
****
yes i understand that, the shape is a rectangle and the sides need to be less than the row of * the square is the same number of * for sides and row
to create a rectangle of asterisks you need to use the width and height of the rectangle, don’t you? that’s why you need self.wifth
so what like this?
for i in range (1,6):
print(s * self.width)
, also another thing i have an issue with is how do i know if its correct
and how many times does it make it happen? remember it needs to work for a rectangle of any height, so that means height 4 or height 49. What can you use?
it’s not correct for now, and you need to return a string for the tests to be able to tell you if the string you return is correct
and how do i do this? wdym a string for the tests? okay so this is what i think you mean do you mean like you print out and test the code? Also what do you mean by it’s not correct for now, do you mean it is correct fo rnow
Which of these steps are you on
no, the tests expect something returned from the function
no, it’s not correct, we are trying to go toward correct.
I will not write the code for you, but it seems there are some holes in your knowledge and understanding, and you are not engaging in problem solving from my prompting so I have no idea how to help you
i mean probably the if you can’t find solution, but i’ve sworn to myself i must do at least 2 hours of this a day, every day so until them 2 hours are up i can’t sleep
yeah i’m very tired , ill slow it down a little will get back to you within 10 mins
Come up with 1 specific question. You can’t ask a question like this
And post instructions for 2 different functions. You’re not helping yourself.
Focus on one thing at a time.
to answer this question, well i know from the code , and instructions 49 has to be maximum height and width, could i perhaps use (1,49)?
Test out your function and see what it does. Then decide if it does what you expect and think if you need to make any changes.
Just making random guesses and coming here to ask is not the way to proceed.
Use the scientific method.
- Hypothesis, make a change to the code
- Test, print the result of the function
- Observe the result and analyze it
- Make a new hypothesis and test it
repeat, repeat
Have a system.
Continually asking “like this?” in the forum is not a system…
Try it out, print the result. Does it work? You tell us!
wait oh, i’m much more sharper today, i just realised the example code is very helpful in terms of testing and overall code, thanks guys.
my tests are just constantly stuck on the science emoji thing, what can i do to fix this?
what science emoji thing?
I think he means this Erlenmeyer flask icon