Summary

In this lab, we covered several major important topics. Let’s quickly review them.

Pseudocode Conditional Statements

  • if statement
IF(<boolean expression>)
{
    <block of statements>
}
  • if-else statement
IF(<boolean expression>)
{
    <block of statements 1>
}
ELSE
{
    <block of statements 2>
}

Python Conditional Statements

  • if statement
if <boolean expression>:
    <block of statements>
  • if-else statement
if <boolean expression>:
    <block of statements 1>
else:
    <block of statements 2>

Testing

  • Branch Coverage - all possible branches are executed at least once
  • Path Coverage - all possible paths through branches are executed at least once
  • Edge Cases - values that are near the point where Boolean expressions go from false to true