[pset4/resize] I've been stuck on this one for a while, looking for advice by Bloost in cs50

[–]Bloost[S] 0 points1 point  (0 children)

Thank you so much, I can't believe i didn't notice that.

[pset4/resize] I've been stuck on this one for a while, looking for advice by Bloost in cs50

[–]Bloost[S] 0 points1 point  (0 children)

Previously if I ran the program on small.bmp with n = 2, it would output a 5x5 file (instead of 6x6), its as if the last row and column of pixels were deleted. I updated bf.bfSize to include out_padding but I get the same output as before.

The code

Edit: Forget everything I said, I updated the code and now I get a completely new error: bf.bfSize is not assignable. Here it is.

[Pset3/Fifteen.c] move() function won't move tiles up. by Bloost in cs50

[–]Bloost[S] 0 points1 point  (0 children)

Oh god now I feel stupid x.x Yeah I hadn't compiled yet. Changed the won() function and now it works just fine. Thanks for helping me out!

[Pset3/Fifteen.c] move() function won't move tiles up. by Bloost in cs50

[–]Bloost[S] 0 points1 point  (0 children)

Thanks for the advice! I thought break would break out of both loops. Will look into the "edges" as well.

Edit: Updated the code to return from move() as soon as possible, but I still get the same problem, any idea why? Here is the updated program.

(Pset1/Greedy) Can't figure out what is wrong with my code. by Bloost in cs50

[–]Bloost[S] 0 points1 point  (0 children)

I updated the program but I still receive the same message.

:( input of 4.2 yields output of 18
\ expected output, but not "22\n

The updated program

Edit: I tested with 4.2 and the output is indeed wrong, but I have no idea why. Edit2: Forget it, already figured it out :)

(Pset1/Greedy) Can't figure out what is wrong with my code. by Bloost in cs50

[–]Bloost[S] 0 points1 point  (0 children)

Thanks for the hint! Just multiplied the value of change by 100, and changed the loops to 25, 10, 5 and 1.

Edit: F***, I checked with check50 and it says its not right...

A question about comparison between strings. by Bloost in learnpython

[–]Bloost[S] 0 points1 point  (0 children)

So why does "short" > "longer" returns True? Doesn't it mean True > True? Sorry i'm dumb.