SCT Error in Part 11


#1

I keep getting the message “SCT Error” when I try to run my code in Part 11 “New Entries”, but the code does not appear to be wrong. Here is a link to the lesson:
https://www.codecademy.com/courses/learn-python/lessons/python-lists-and-dictionaries/exercises/new-entries?action=lesson_resume

and a screenshot:

Any help would be appreciated. Thanks.


#2

Have you tried refreshing the page?


#3

Seems to be the same issue they were having in this thread.

It’s likely an issue with codecademy, though the mods state that the issue has been fixed. If it’s still persisting, I would recommend submitting a formal bug report


#4

Right, I found that thread. The error was not going away even after resetting the workspace and refreshing the page, but now it is working after stepping away for a half an hour. I guess I will submit a bug report. Thanks!


#5

I am currently experiencing this issue on the python battleship lesson 5/19. I submitted the bug report after trying to restart codecademy and refresh the page many times on chrome.

board = []

for i in range(5):
  board.append(["O"] * 5)

def print_board(board_in):
  for i in range(5):
    print board_in[i]

print_board(board)

Very odd. Not sure what to do now that I am stuck on it.


#6

jk9988

I am getting the same error with the code I wrote for that part, which also prints correctly.

I’ve submitted a bug report, but It’s really nice to know it’s not just me.


#7

I figured out that the SCT error is their compiler throwing an error on one of its case tests. It isn’t an error in any of our code per say but that we missed some of their test cases. In my case their tests wanted the print_board function to be able to work on any board input instead of just the 5 list battleship board, which is fair.

@zinerith here is my new code:

board = []
for i in range(5):
  board.append(["O"] * 5)

def print_board(board_in):
  for row in board_in:   #can also use for row in range(len(board_in)):
    print row
    
print_board(board)

#8

Ah, thanks! That’s a good thing to know.

Also, it works!


#10

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.