SymPy/Initialization and Documentation

From PrattWiki
Revision as of 16:46, 19 September 2022 by DukeEgr93 (talk | contribs) (Created page with "==Documenting Your Work== Use a docstring set off with triple quotes at the start of your code to give your name, NetID, and any other useful information about the code in gen...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documenting Your Work

Use a docstring set off with triple quotes at the start of your code to give your name, NetID, and any other useful information about the code in general. You can use #, #%%, or docstring comments throughout your code to make it easier to follow.

Clearing the Variables

Remember that when Python runs a script, it "remembers" everything that it has done in the session. For that reason, it is good programming practice to clear the variables in Python on occasion to make sure your script is actually doing everything it needs to work. The trash can icon above the variable explorer will clear the session.

Saving Your Work

If you hit "play" or F5 to save and run your work, your work will be saved to whatever file name you give it. Note that if you are just running parts of your code by selecting code or a cell and clicking the run current line or run current cell button, that will not save the code!

Questions

Post your questions by editing the discussion page of this article. Edit the page, then scroll to the bottom and add a question by putting in the characters *{{Q}}, followed by your question and finally your signature (with four tildes, i.e. ~~~~). Using the {{Q}} will automatically put the page in the category of pages with questions - other editors hoping to help out can then go to that category page to see where the questions are. See the page for Template:Q for details and examples.

External Links

References