1 / 8

UW CSE 190p Section

UW CSE 190p Section. 6/28, Summer 2012 Dun-Yu Hsiao. Before We Start. Create an empty text file and save everything you try and get in it as a report for today. Include the following in the report file: Your name and your teammate’s name The command scripts you run today

bart
Download Presentation

UW CSE 190p Section

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UW CSE 190p Section 6/28, Summer 2012 Dun-Yu Hsiao

  2. Before We Start • Create an empty text file and save everything you try and get in it as a report for today. • Include the following in the report file: • Your name and your teammate’s name • The command scripts you run today • Email to TA after class. • As usual, work with your teammate and you are welcomed to ask!

  3. Outline • Import • Debugging

  4. Exercise • Do Problem 2 in Homework 2. • Save the results of Problem 2 in the report.

  5. Import Basics • Import • To not reinvent the wheel! • Use the console to check usage quickly! Use “tab” to loop through available functions!

  6. Debug Basics • Print • Using PDB • import pdb • Pdb.set_trace() • Next, continue, quit, print, list, step in, return • Careful about overwriting variables

  7. Ex 1. try to print total • Ex 2. insert one print statement to check the i iterations on each factorial • Ex 3. use pdb

  8. Questions?

More Related