Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

HW6-rec. Can spaceships rotate to 90 degrees?

A
ArsenRB (240 points)
1 2 3
in HW6 by (240 points)
My program for this hw  handles only 4 out of 10 tests. So I focused on one particular situation when my program returns different result:

AssertionError: Lists differ: [True, False, False, False, True, True, False, True, True, False] != [True, True, False, False, True, True, False, True, True, False]

As you can see here only one element differs. So by debugging particulary this case, I found out that the second spaceship can fit to the city if only rotates to 90 degrees. So I redesigned my prgm to handle the case and.... it did mot work!

So, 2 things might be happening here:

1. I did a mistake while debugging and spaceships can't rotate.

2. It can, but my prgrm doesn't work

Help me, so I don't waste time focusing on both cases
235 views

2 Answers

GabrielAlexandru (7760 points)
2 4 29
by (7.8k points)
Theoretically the spaceships don’t have to rotate in order to fit between buildings. You probably have a bug in your code.

I had the same problem when checking if a spaceship’s pattern matched something from the given image.
andrea.sterbini (208020 points)
756 1270 2377
by (208k points)
No rotation allowed