Topic 6 - Session 6 - MTA Intro Course Flashcards
What will be the value of the variable “upperbound” in the code example below?
upperbound = math.ceil(44.4)
The function will round the value up to 45.
What will be the value of the variable “lowerbound” in the code example below?
lowerbound = math.floor(44.4)
The function will round down to 44.
What python module is required when working with files?
import io
What python module is required when you need to display system information?
import sys
Provide one example of why the sys module would be useless to use in an application
The module could be used to display error messages.
Which python module is required if you wish to create a folder on a local machine?
import os
Which module is required to generate a random integer in python?
from random import randint