Difference between revisions of "Python:Common Mistakes"

From PrattWiki
Jump to navigation Jump to search
(Created page with "==Overview== This page is designed as a resource for new programmers learning Python for [http://pundit.pratt.duke.edu/wiki/EGR_103/Spring_2020 EGR 103]. If you are an experi...")
(No difference)

Revision as of 21:27, 15 January 2020

Overview

This page is designed as a resource for new programmers learning Python for EGR 103. If you are an experiencing an error with which you are not familiar, check the common mistakes below first.

Problems with Variables

These are problems involving the use, saving, and manipulation of variables, often encountered during the first 3 labs of EGR 103.

Assignment vs. Accessing

Calculating in a Vacuum

Mutable and Immutable Data Types

Problems with Methods

Printing vs. Returning

Methods that Return and Methods that Modify

Miscellaneous

For Loops vs. For-Each Loops

See also: Enumerate

Testing Your Code

Network Errors

Variable Explorer

Renaming Existing Variables