Run button spins forever after error - python

Infinite Run button spin

https://www.codecademy.com/courses/learn-python/lessons/student-becomes-the-teacher/exercises/just-weight-and-see?action=lesson_resume

On lesson 5 I clicked “Get Code” after multiple fails, and on 6 I’m getting the following error =( 4/script.py has been moved. This will cause problems with this exercise, please move 4/script.py back to its original location, or reset your files )

Now when I click the “Run” button it keeps spinning for infinity. I left it for a half hour, and still nothing.

I can’t progress at all and need help! Please!!!





Just running? Scratches head…

Can we be certain that the provided code is not just added to already incorrect code? Please post your code so we can have a llook if this might be the case. Thanks.

2 Likes

After I clicked “Get Code” it erased all my code and did not in fact add the correct code. I tried to copy and paste back my previous code because I always save a back up in notepad, however the error pops up. Then when I try to run it and see if it’s correct, it spins forever. So really there is no code it erased it all. However I could give you the code where I left off below. Thanks.

lloyd = {
  "name": "Lloyd",
  "homework": [90.0, 97.0, 75.0, 92.0],
  "quizzes": [88.0, 40.0, 94.0],
  "tests": [75.0, 90.0]
}
alice = {
  "name": "Alice",
  "homework": [100.0, 92.0, 98.0, 100.0],
  "quizzes": [82.0, 83.0, 91.0],
  "tests": [89.0, 97.0]
}
tyler = {
  "name": "Tyler",
  "homework": [0.0, 87.0, 75.0, 22.0],
  "quizzes": [0.0, 75.0, 78.0],
  "tests": [100.0, 100.0]
}

`student = [lloyd, alice, tyler]`

def average(numbers):
    total = sum(numbers)
    total = float(total)
    avg = total / len(numbers)
    return avg
  
def get_average(student):
      homework = average(student["homework"])
      quizzes = average(student["quizzes"])
      tests = average(student["tests"])
      return 0.1 * homework + 0.3 * quizzes + 0.6 * tests

If those back ticks are in your code, that will be something to remove. The rest of your code looks good, and even follows the instructions (also good).

1 Like

Those were added because of this forum, not part of my code. Here I’ll try this code again I’ll let you know what happens.

Take a look, it has not gone through. If someone could just grant me access to the next lecture so I could move on I would appreciate that. I already understand the concepts would like to finish this course so that I may start some python projects.

Thanks.

We can still see the back ticks.

1 Like

Same issue.

Check your inbox. I sent you some code to try. Let us know if you are able to move on.

1 Like

It still did not work…

Did you Report A Bug with this problem? I’ll move this topic in the Platform Problems section.

In the meantime, if you have another browser you can try it in, go ahead and try that. Do a page refresh, and try again. Reset and Refresh and try again.

Be sure to tell the team what your browsers are, and your OS.

1 Like

Yes, twice now. Would be nice resolve this.

I’m out of suggestions. You could put this module on hold and move on to another module for the time being.

1 Like

I believe the next one is locked.

Right, forgot about that. In the old courses we could do modules in any order (if we so chose). Not the case anymore. There is nothing we can do from this (the volunteer) side.

1 Like

I’m having problems like this, too. I stopped learning Python for a while and went to learn Ruby instead. I don’t I have any solutions, though.

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