Difference between revisions of "EGR 103/Concept List/F21"

From PrattWiki
Jump to navigation Jump to search
(Created page with "== Lecture 1 == * Main class page: [http://classes.pratt.duke.edu/EGR103F21/ EGR 103L]. * See information on PDF of slide show on [http://classes.pratt.duke.edu/EGR103F21/erra...")
 
(Lecture 1)
Line 2: Line 2:
 
* Main class page: [http://classes.pratt.duke.edu/EGR103F21/ EGR 103L].
 
* Main class page: [http://classes.pratt.duke.edu/EGR103F21/ EGR 103L].
 
* See information on PDF of slide show on [http://classes.pratt.duke.edu/EGR103F21/errataetc.html Errata / Notes] page.
 
* See information on PDF of slide show on [http://classes.pratt.duke.edu/EGR103F21/errataetc.html Errata / Notes] page.
 +
* Sakai page: [https://sakai.duke.edu/portal/site/egr103f21 Sakai 103L page]; grades, surveys and tests, some assignment submissions
 +
* Pundit page: [[EGR 103]]; reference lists
 +
* CampusWire page: [https://campuswire.com/c/GCCD2906F/feed CampusWire 103L page]; message board for questions - you need to be in the class and have the access code 8018 to subscribe.
 +
 +
== Lecture 2 - Programs and Programming ==
 +
* Almost all languages have input, output, math, conditional execution (decisions), and repetition (loops)
 +
* Seven steps of programming [https://adhilton.pratt.duke.edu/sites/adhilton.pratt.duke.edu/files/u37/iticse-7steps.pdf The Seven Steps Poster]
 +
** Watch video on [https://www.coursera.org/lecture/duke-programming-web/developing-an-algorithm-nopgq Developing an Algorithm]
 +
** Watch video on [https://www.coursera.org/lecture/duke-programming-web/a-seven-step-approach-to-solving-programming-problems-AEy5M A Seven Step Approach to Solving Programming Problems]
 +
* Consider how to decide if a number is a prime number
 +
* To play with Python:
 +
** Install it on your machine or a public machine: [https://www.anaconda.com/download/ Download]
 +
* Quick tour of Python
 +
** Editing window, variable explorer, and console
 +
** Main numerical types: whole numbers (int) and numbers with decimals (float)
 +
** + - * // (rounded division) and % (remainder / modula) produce in if both sides are an int, float if either or both are floats
 +
** / (regular division) and // (rounded division) produces float with ints or floats
 +
** ** to do powers
 +
** Python doesn't know everything to start with; may need to import things
 +
*** <code>import MODULE</code> means using <code>MODULE.function()</code> to run
 +
*** <code>import MODULE as NAME</code> means using <code>NAME.function()</code> to run
 +
** <code>VAR = input("prompt: ")</code> will ask the user for a value and stores whatever they type as a string
 +
** <code>NUM = int(VAR)</code> will convert the item in VAR to an integer if it looks like an integer; error otherwise

Revision as of 16:32, 27 August 2021

Lecture 1

  • Main class page: EGR 103L.
  • See information on PDF of slide show on Errata / Notes page.
  • Sakai page: Sakai 103L page; grades, surveys and tests, some assignment submissions
  • Pundit page: EGR 103; reference lists
  • CampusWire page: CampusWire 103L page; message board for questions - you need to be in the class and have the access code 8018 to subscribe.

Lecture 2 - Programs and Programming

  • Almost all languages have input, output, math, conditional execution (decisions), and repetition (loops)
  • Seven steps of programming The Seven Steps Poster
  • Consider how to decide if a number is a prime number
  • To play with Python:
    • Install it on your machine or a public machine: Download
  • Quick tour of Python
    • Editing window, variable explorer, and console
    • Main numerical types: whole numbers (int) and numbers with decimals (float)
    • + - * // (rounded division) and % (remainder / modula) produce in if both sides are an int, float if either or both are floats
    • / (regular division) and // (rounded division) produces float with ints or floats
    • ** to do powers
    • Python doesn't know everything to start with; may need to import things
      • import MODULE means using MODULE.function() to run
      • import MODULE as NAME means using NAME.function() to run
    • VAR = input("prompt: ") will ask the user for a value and stores whatever they type as a string
    • NUM = int(VAR) will convert the item in VAR to an integer if it looks like an integer; error otherwise