About Jupyter Notebooks and other Environments
Besides PyCharm, there are many ways to develop Python code. You might use Idle, Xcode, Visual Studio, Jupyter Notebooks or many other environments. The code you submit on github must have a .py extension and must run immediately on PyCharm.
You github repository will also include a free codespace account with an online editor modeled after Visual Studio. It's fine to write your code there, just be sure to commit and push your solution.
Coding in a Jupyter Notebook and using iPython is a fantastic way to learn, and as a data scientist it is a great way to maintain a lab notebook and also immediately see graphical results of your work. I encourage you to try Jupyter, but I think it will be tough to make it work for this class, as we will be using GitHub. You do need to know that I cannot grade anything that is written in iPython (.ipynp or similar extension).
π― Main Rule (VERY IMPORTANT)
π You must submit a .py file
π Your code must run in PyCharm
❌ NOT allowed for submission:
-
.ipynb(Jupyter Notebook) - iPython files
- screenshots or text files
π§ What this means
Even though there are many coding tools like:
- Jupyter Notebook
- Visual Studio Code
- PyCharm
- IDLE
π Your instructor will ONLY grade code that works in PyCharm as a .py file
⚠️ Why Jupyter is NOT allowed
Jupyter Notebook files (.ipynb):
- Run code in cells (not like normal programs)
-
May not follow
main()structure - Don’t match assignment requirements
- Hard to test automatically
π So even if your code works there, you will not get credit
✅ What you SHOULD do
Option 1 (Best)
Use PyCharm directly
Option 2
Use GitHub Codespaces / VS Code
π BUT you must:
- Save file as:
assignment1.py
- Make sure it runs like a normal program
- Upload (push) to GitHub
π§ͺ How to double-check before submitting
Open your .py file in PyCharm and run it:
Please enter your name: Eric
Hi Eric, let's explore some historical temperatures.
π If it runs like this → ✅ You’re safe
π¨ Common mistakes students make
-
❌ Submitting
.ipynbfile -
❌ Writing code outside
main() - ❌ Using Jupyter-style output
-
❌ Forgetting
if __name__ == "__main__":
π Simple checklist before submission
-
✔ File ends with
.py - ✔ Runs in PyCharm
-
✔ Uses
main() - ✔ Output matches exactly
- ✔ Uploaded to GitHub
No comments:
Post a Comment