0

I am working through CS50P, just finishing off Problem Set 6. The last problem in the set is entitled: CS50 P-Shirt.

I can see that my shirt.py program creates images exactly as required, and it passes all the manual tests in the How to Test section.

By eye, it's not possible to tell the results of the manual test apart from the given demo.

This one is generated by my program: this one is generated by my program

This one is the demo from the CS50 P-Shirt webage: this one is the demo from the CS50 P-Shirt webage

Yet, the check50 says that there is something wrong with how the shirt is being displayed on the muppet images:

enter image description here

I did everything as the problem requested; I used ImageOps.fit to resize and crop the input to be the same size as the shirt image; I used Image.paste like the webpage suggested.

The check50 seems to have no problem with any of the implementations of sys.exit(), just the way the shirt is overplayed on the muppet images.

Is check50 broken?

2 Answers 2

2

i fixed it by removing "method=0" from :

ImageOps.fit(image, size, method=0, bleed=0.0, centering=(0.5, 0.5))

and then it worked

1
1

Solved! :)

enter image description here

It turned out that the problem was that my program was importing a package that I had written myself — as per Lecture 4 — to make the code tidier.

I had written my own function to solve part of the problem. It turns out that check50 will only open one file in the /shirt directory — it will only open shirt.py.

Any my_package.py file in the /shirt folder, that the shirt.py program might want to import from, won't be read by check50 (or by submit50).

Once I copied and pasted my code from the my_package.py file into the shirt.py file, check50 was happy.

And then submit50 only submitted ./shirt.py — which makes sense now; I didn't realise that the problem had to be solved in one file until today.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .