EGR 103/Concept List/F22

From PrattWiki
Revision as of 16:50, 2 September 2022 by DukeEgr93 (talk | contribs)
Jump to navigation Jump to search

Lecture 1 - 8/29 - Course Introduction

  • Main class page: EGR 103L
    • Includes links to Sakai, Pundit, and Ed pages
  • Sakai page: Sakai 103L page; grades, surveys and tests, some assignment submissions; first day slideshow in Resources section

Lecture 2 - 8/27 - Programs and Programming

  • Almost all languages have input, output, math, conditional execution (decisions), and repetition (loops)
  • Seven steps of programming The Seven Steps Poster. Also, for Monday's class:
  • Problem: Consider how to decide if a number is a prime number
    • Some "shortcuts" for specific factors but need to have a generalized approach
    • See if number is evenly divisible by any integer between 2 and the square root of the number - but how do we ask the computer to do that?
  • Quick tour of Python
    • Console (with history tab), variable explorer (with other tabs), and editing window
    • Main numerical types: whole numbers (int) and numbers with decimals (float)
    • Can use % (called "mod") to get "remainder"
      • If both items are integers, result is an integer; if either is a float, result is a float
    • Relational operators: < <= == >= > !=
      • Result is is either True or False
  • Comments in code:
    • If there is a #, Python ignores everything remaining in that line after the #
    • If there are """ or , Python ignores everything until the closing """ or
    • If you use # %% in Spyder, the editing window will set up a cell and light up the cell your cursor is in. Cells have no impact on how the code runs, just how the code appears in the window