1 / 7

Debugging and Printing

Debugging and Printing. George Mason University. Today’s topics. Review of Chapter 3: Printing and Debugging Go over examples and questions debugging in Python. Debugging and printing review. How do we trace through code by hand?

vanida
Download Presentation

Debugging and Printing

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. Debugging and Printing George Mason University

  2. Today’s topics • Review of Chapter 3: Printing and Debugging • Go over examples and questions • debugging in Python

  3. Debugging and printing review • How do we trace through code by hand? • What is a print statement? How is it different than a return statement? • What is a function? How do we call one?

  4. Let’s go over the exercises

  5. Printing and Functions in python • printis a keyword that prints out the expression that follows it • str is actually a function that we call with an argument • Any guesses what’s going on in the last and first line? (we’ll cover this in the future)

  6. Debugging in python • You can always use print statements to debug your code • There are other tools that can save time if you just want to trace through the code once, not by hand: • http://pythontutor.com/visualize.html#mode=edit • in-class demo

  7. Questions?

More Related