jagomart
digital resources
picture1_Python Pdf 183089 | Lec03 Item Download 2023-01-31 16-03-02


 206x       Filetype PDF       File size 1.63 MB       Source: cs.brown.edu


File: Python Pdf 183089 | Lec03 Item Download 2023-01-31 16-03-02
lecture 03 iteration in python based in part on notes from the cs for all curriculum developed at harvey mudd college 1 last time lecture 02 conditional statements and flow ...

icon picture PDF Filetype PDF | Posted on 31 Jan 2023 | 2 years ago
Partial capture of text on file.
                       Lecture 03
                 Iteration in Python
            based in part on notes from the CS-for-All curriculum
                   developed at Harvey Mudd College
                                                           1
                        Last Time (lecture 02)
      •  Conditional Statements and Flow of Control
          • if
          • if-else
          • if-elif-else
          •  True/False Blocks (require indentation)
      •  Variable Scope
          •  Local
          •  Global
      •  Memory: Frames and the Stack
          •  Tracing global, local, and printed output
          •  Functions calling Functions
                                                                              2
                           Review
               Default Index/Slicing Values
      s == s[:] 
      s[:] = s[::]
      s[::] = s[0:len(s):1]
      s[len(s):] == ‘’
      s=‘01234’  # len(s) == 5
      s[2:] == s[ ?? : ?? : ?? ]
      s[:3] == s[    :    :   ]
      s[::2] == s[    :    :   ]
      s[:4:3] == s[    :    :   ]
      s[1::2] == s[    :    :   ]
                                                        3
                           Review
               Default Index/Slicing Values
      s == s[:] 
      s[:] = s[::]
      s[::] = s[0:len(s):1]
      s[len(s):] == ‘’
      s=‘01234’  # len(s) == 5
      s[2:] == s[2:5:1]
      s[:3] == s[0:3:1]
      s[::2] == s[0:5:2]
      s[:4:3] == s[0:4:3]
      s[1::2] == s[1:5:2]
                                                        4
The words contained in this file might help you see if this file matches what you are looking for:

...Lecture iteration in python based part on notes from the cs for all curriculum developed at harvey mudd college last time conditional statements and flow of control if else elif true false blocks require indentation variable scope local global memory frames stack tracing printed output functions calling review default index slicing values s len...

no reviews yet
Please Login to review.