Help! I can't figure out why one program runs but another has errors

I am working with students and having them code the game of Pig with dice. I keep getting a Function Redeclaration error when I run identical Python code. I am working with students and they are typing the code line by line and I don’t know if this causes errors since they are not working with blocks.

Code with Errors

Code with No Errors

Welcome, @MrDGuy!

The erroneous code seems to contain in extension import of the whole project itself, called dice-pig-assets-1. This causes duplication of the whole code base, not only the function as in the error message(a student trying to take a short cut, maybe? :wink: )

Removing this extension from the Explorer menu and then reimporting this seems to fix it.
https://github.com/microsoft/arcade-tutorial-extensions/adventure

However, the code with no errors has also the extension pxt-arcade-playing-cards imported.

Not sure if that is also needed in the one that had errors? But at least the errors are gone now, code seems to work without having done further investigations and you can convert the “typed” Python code back to blocks or JavaScript.