{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "# MTH5001 Introduction to Computer Programming - Lab 5\n", "Dr. Lennart Dabelow and Prof. Thomas Prellberg\n", "\n", "## Exercises" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Exercise 1: Translating mathematical statements into Python code" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For any statements A and B, you will recall that the statement \"A implies B\" is equivalent to \"B or not A\". This can be demonstrated by constructing a truth table:\n", "\n", "
A | \n", "B | \n", "A implies B | \n", "B or not A | \n", "
---|---|---|---|
True | \n", "True | \n", "True | \n", "True | \n", "
True | \n", "False | \n", "False | \n", "False | \n", "
False | \n", "True | \n", "True | \n", "True | \n", "
False | \n", "False | \n", "True | \n", "True | \n", "