Search for tag: "print"

Lesson 16.1 The For-Loop

In this video we introduce a new control-structure: the for-loop. This control structure is specifically designed for processing iterable types like strings, tuples, and lists.

From  Hannah Lee on October 19th, 2020 15 plays

Lesson 14.3 Try-Except and the Stack

The except-portion of an try-except statement is only executed when there is an error/crash. But, as we have seen, errors can occur anywhere in the call stack. In this video we show how try-except…

From  Hannah Lee on October 10th, 2020 14 plays

Lesson 10.7 Multifunction Debugging

Top-down design simplifies the design of code, but it can make debugging a little more complicated. Now bugs are potentially spread across multiple functions. In this video we look at an extended…

From  Hannah Lee on October 2nd, 2020 3 plays

Lesson 10.4 Iterative Testing

We made very sure that you had learned about testing before you started on your first assignment. That is because we want you testing while you are activtely writing your code, and not waiting until…

From  Hannah Lee on October 2nd, 2020 3 plays

Lesson 9.9 Tracing Conditionals

Now that program structure and program flow are different, debugging is going to get a lot harder. In this video we introduce a new element of white box testing – the trace. You will need to…

From  Hannah Lee on September 24th, 2020 3 plays

Lesson 9.3 If-Else Statements

In this video we introduce the if-else statement. It is like the if statement, except that you now chose between two options.

From  Hannah Lee on September 24th, 2020 6 plays

Lesson 9.2 If Statements

In this video, we introduce this simplest form of conditional statement, the ifstatement. It allows us to skip over code if we do not wish to execute it.

From  Hannah Lee on September 24th, 2020 5 plays

Lesson 8.5 Debugging

Testing is not the same as debugging, but it is the correct first step. In this video, we show how to take the next step to isolate and remove errors in your code.

From  Hannah Lee on September 24th, 2020 3 plays

Lesson 8.4 Test Procedures

As our modules get more complicated, with more an more function definitions, our test scripts will get more complicated as well. In this video we show how to organize our test scripts by putting the…

From  Hannah Lee on September 24th, 2020 6 plays

Lesson 8.3 Test Scripts

A good testing plan has many, many test cases, and it can be really tedious to keep testing a function. That is why it would be ideal if we could automate the process. In this video, we introduce the…

From  Hannah Lee on September 24th, 2020 6 plays

Lesson 5.3 Function Modules

In the previous video, we wrote a function definition in the interactive shell. In this video, we write it in a module. We show how this changes things when you call the function.

From  Hannah Lee on September 11th, 2020 6 plays

Lesson 5.4 Fruitful Functions

In this video we show how to define the definition of a fruitful function (a function that can be used as an expression). It requires a new type of command: the return statement.

From  Hannah Lee on September 11th, 2020 9 plays

Lesson 4.6 Interactive Scripts

Right now, we do not know a lot of Python commands, and so our scripts are pretty boring. But we can make them a lot more interesting with a function that we have already seen: the input function. In…

From  Hannah Lee on September 9th, 2020 8 plays

Lesson 4.5 Script Visualization

In this video, we introduce the Python Tutor. While this tool will be incredibly important when we start discussing some of the more advanced topics in this course, we can already start using it to…

From  Hannah Lee on September 9th, 2020 7 plays

Lesson 4.4 Modules vs Scripts

At this point you are wondering what is the difference between a module and script, since they both end in .py. This is an excellent question. But as this video shows, the answer may not be what you…

From  Hannah Lee on September 9th, 2020 7 plays

Lesson 3.2 String Functions

Strings are very powerful type that we will use in the first major assignment. In this video we introduce the three main string functions that you should be aware of.

From  Hannah Lee on September 9th, 2020 6 plays