This document provides guidance on developing a modular Python program to solve a unit conversion problem from homework assignments. It explains that a modular program breaks a complex problem down into subtasks addressed by individual code modules. As an example, a program is presented that converts galactic standard weeks to minutes using four modules: a main module that controls the overall flow and coordinates three other modules that handle the major subtasks. The modules communicate through parameter passing and return values.
Develop a modular Python program for your unit conversion problem, i.pdf
1. Develop a modular Python program for your unit conversion problem, i.e., the problem you
worked on for Homeworks #2, #3, #4, and #8.
Here is a modular Python program that converts galactic standard weeks to minutes. Use this
example to guide you in developing your Homework #9 solution.
You will learn the basics of developing modular programs in Unit #6. When we develop a
program or software system to address a complex problem, we can break down the problem into
subtasks and write code modules, each of which focuses on one of the subtasks.
The modular unit conversion program is functionality decomposed as shown in the structure
chart below
Four modules are used, one of which is the main
The main controls and coordinates the activities of the modules written for the major subtasks
Modules communicate with each other by using proper parameter passing and explicit function
return values