Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python Basics Notebook #27

Open
wants to merge 6 commits into
base: jbook
Choose a base branch
from
Open

Conversation

janash
Copy link

@janash janash commented Jan 3, 2025

This PR adds a notebook with and Introduction to Python. It covers basic syntax, setting variables, data types, for loops, and conditionals. This is very closely modeled after the MolSSI intro lesson, but has expanded content related to using Python and some other conceptual areas.

This PR also adds more files to the .gitignore so that standard Python files are covered.

The notebook includes a link to a Google Colab notebook with the same content.

I wasn't sure where to put this general type of notebook, so I created a new directory called "python" for standard Python tutorials.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -0,0 +1,873 @@
{
Copy link
Contributor

@FoleyLab FoleyLab Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider saying "assign the value of an expression to a variable" instead of "assign an expression to a variable" in the markdown cell about assigning variables.


Reply via ReviewNB

@@ -0,0 +1,873 @@
{
Copy link
Contributor

@FoleyLab FoleyLab Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #2.    deltaS =  10.4     # kJ/(mole * Kelvin)


Reply via ReviewNB

@@ -0,0 +1,873 @@
{
Copy link
Contributor

@FoleyLab FoleyLab Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #1.    # calculate something with your variables - what might we want to calculate with deltaH, deltaS, and temp?

Consider explicitly instructing them to calculate deltaG since you expect them to have the value later when they use the round function.


Reply via ReviewNB

@@ -0,0 +1,873 @@
{
Copy link
Contributor

@FoleyLab FoleyLab Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider saying "There is a built-in Python function called round that we can use to round..." rather than "We can use the round function."

Also wondering if a very brief mention that there are both "built-in" and user-defined functions in python?


Reply via ReviewNB

@@ -0,0 +1,873 @@
{
Copy link
Contributor

@FoleyLab FoleyLab Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should and, or, and not have highlighting? and,or,not


Reply via ReviewNB

@FoleyLab
Copy link
Contributor

@janash This is a great intro! I will think about the python chapter name (vs some other chapter name, like 'introductory material' or something) a bit more while you consider the few small edits I suggested.

@janash
Copy link
Author

janash commented Feb 3, 2025

Hey @FoleyLab - I've addressed your comments! Would love another review.

Thanks!

@janash
Copy link
Author

janash commented Feb 22, 2025

@FoleyLab - just a reminder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants