v2 necu20 2021-01-26 04:17:49 v4.0.0 (2019-03-05) Generated 2021-01-26 05:17:50 by dbwebb lab-utility v4.0.0 (2019-03-05). https://github.com/dbwebb-se/lab """ from json import dumps from dbwebb import Dbwebb from classes import Person, Address, Teacher, Student # pylint: disable=invalid-name dbwebb = Dbwebb() dbwebb.ready_to_begin() # ========================================================================== # Lab 2 - oopython # # If you need to peek at examples or just want to know more, take a look at # the [Python documentation](https://docs.python.org/3/library/index.html). # Here you will find everything this lab will go through and much more. # # -------------------------------------------------------------------------- # Section 1. Class relationships # # Practice on creating classes and relationships between them in python. #
#!/usr/bin/env python3 import re from dbwebb import Dbwebb # pylint: disable=invalid-name dbwebb = Dbwebb() dbwebb.ready_to_begin() # ========================================================================== # Lab 2 - python # # In this exercise we will look into flow-control. If-statements, for-loops # and while-loops. # # -------------------------------------------------------------------------- # Section 1. Boolean operators and if-statements # # The basics of boolean operators and if-statements. # # """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" # Exercise 1.1 (1 points) # # Create three variables representing dice values: `dice1` = 5, `dice2` = 5 # and `dice3` = 2. # # Answer with the boolean value of the expression '`dice1` is greater than # `dice2`'.