ENET 102 · SYLLABUS
Math & Text Tools
Turn values into useful calculations, readable text and simple reports.
Learning outcomes
- Calculate budgets using arithmetic
- Convert and format text
- Apply pure math functions
Module schedule
MODULE 1 · Study → Live lab → Practice
Arithmetic & parentheses
Use +, -, *, / and % for addition, subtraction, multiplication, division and remainder. Parentheses make the order explicit. Division by zero is rejected.
Assignment: Estimate the time cost of a different project.
MODULE 2 · Study → Live lab → Practice
Convert & combine
number converts numeric text to a number; str converts a value to text. + joins text with another value. Non-finite results, such as converting non-numeric text, are rejected.
Assignment: Try converting another numeric string.
MODULE 3 · Study → Live lab → Practice
Text functions
upper and lower change letter case. len counts characters in text or items in a list. These are pure functions: they return a value without changing the original.
Assignment: Format your own project name in uppercase.
MODULE 4 · Study → Live lab → Practice
The shared math toolkit
abs, round, sqrt, min and max are available in the JTWAYNE CODE prototype toolkit. min and max take two arguments; the other tools take one.
Assignment: Use max to keep a computed budget above a chosen floor.
Final project: A project-budget calculator
Calculate a sample project budget including labor, materials and a 10% contingency. This is a console exercise, not financial advice.
- Use 8 hours at $15 per hour
- Add $30 for materials
- Apply 10% contingency and print subtotal and total
Review correctness against the sample output, readability, comments and the documented limits of your prototype. Extend and test additional inputs after completing the sample.