X 1 / 3 116% EL > ITP 120 Programming Assignment 1 Fall 2020 87 POINTS The chart below lists the 2020 season passes for skiers at the Massanutten Ski Resort theme park in Massanutten, VA. Descriptive loop variable names are okay, as is using i-j-k convention, but we want be consistent with one or the other.Dit View Sign Window Help he Tools ITP120Programmin. Generally, if we use i-j-k convention for loop varaible names, we don't want to mix them with descriptive loop variable names. i should be used for outer-loops, j for once-nested loops, k for twice nested loops, etc. Loop variable names: We use i-j-k for loop variable names because it is general programmer convention for for loops.Similarly, r is a good variable name for describing Polar coordinates (unfortunately there's no theta key, but if you can get the θ character it's also acceptable for a polar coordinate (a little more work than it's probably worth)). x and y (for coordinates): These are what we actually call Cartesian coordinates, so they're actually great variable names for this purpose (but, again, only for coordinates).Note that this only applies to these specific names it does not extrapolate to naming other objects. Graphics g
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |