Case Study: Building Software in Python

Start Free Preview

Buying via our links supports this free directory · Affiliate disclosure.
Course facts
  • Payment: Free Preview (Paid Upgrade)
  • Learning style: Self-paced, start anytime
  • Format: Text & Interactive
  • Video access: Streaming Only
  • Before you start: Intermediate Object-Oriented Programming in Python; Software Engineering Principles in Python
DataCamp details
  • Chapters: 3
Created byDataCamp
Available onDataCamp

Course Details
Learning Style

Start Anytime

Level

Advanced

Study Mode

100% Online

Duration

Short (< 10 Hours)

Languages
Audio Language

English

Outcomes
Certificate

Certificate of Completion

Price & Terms
Pricing Model

Free Preview (Paid Upgrade)

Technical
Content Medium

Text & Interactive

Video Access

Streaming Only

Specification
Access

Subscription

SKU: case-study-building-software-python Category: Tags: , Brand:

Build a mortgage calculator in Python and practice modular design, inheritance, docstrings, Pylint checks and pytest tests along the way.

At a glance
Duration3 hrs
LevelAdvanced
CertificateCertificate of Completion
LanguageEnglish
Taught byMark Pedigo
AccessSubscription
Add your review
Add to wishlistAdded to wishlistRemoved from wishlist 0
Add to compare

You build a mortgage calculator in Python that works out monthly payments based on the loan amount, interest rate and loan term. The project begins with simple calculator classes and grows through inheritance into a financial calculator and a mortgage calculator. Documentation, automated tests and code review keep the code modular and easy to maintain as it expands, so the engineering habits are practiced on code that keeps changing.

What You Will Achieve

  • Split a Python project into modules and connect them with relative or absolute imports
  • Extend existing classes through multilevel inheritance to add calculator features without repeating code
  • Write docstrings for your classes and check their behavior with doctest
  • Review and refactor code with Pylint, then verify it with a pytest unit test suite


Program Overview

Case Study Brief and Calculator Classes

Sets out the mortgage calculator brief and builds the first calculator classes while recapping object-oriented and software engineering principles.

  • BasicCalculator and FinancialCalculator classes
  • The DRY principle and other engineering principles
  • Relative and absolute imports
  • Inheritance, multilevel inheritance and the mortgage calculator class

Documenting and Testing a Python Module

Adds documentation and first automated tests to the calculator code and extends what the inherited classes can do.

  • Docstrings and the dir() function
  • Automated testing with doctest
  • Inspecting a custom class with dir()
  • Adding a method to an inherited class

Code Review, Refactoring and Unit Testing

Checks that the finished calculators work as intended and follow best practices through review, refactoring and fuller tests.

  • Maintainability and good variable names
  • Code quality checks with Pylint
  • Code review and refactoring
  • Benefits of unit testing and tests with pytest

Certificate Awarded (Paid)


Job Outlook

These skills apply wherever Python applications are built and maintained by teams, where code is split into modules, documented, reviewed, refactored and covered by automated tests before it changes hands.


Our take

Good for: Python programmers comfortable with classes who want to apply structure, documentation and testing habits to one small application they build step by step.

Keep in mind: Despite its advanced label, it is a guided case study on one mortgage calculator that recaps engineering habits; testing starts with doctest, and pytest appears only in the closing chapter.

Bottom line: A single running project ties imports, inheritance, docstrings, Pylint and pytest together, so each practice is seen applied to the same growing code.

Frequently Asked Questions

What does the mortgage calculator compute?

It works out monthly payments from three inputs: the loan amount, the interest rate and the loan term. Later lessons add a financial calculator and a mortgage calculator class that build on the basic one through inheritance.

How are the calculator files linked together?

The first chapter compares relative and absolute imports for connecting the calculator modules, then uses inheritance and multilevel inheritance so the advanced calculators reuse code from the basic one instead of repeating it.

Which testing tools does the case study use?

Two of them. The second chapter introduces automated testing with doctest alongside the docstrings that document the new class. The final chapter looks at why unit testing helps and has you test the calculator code with pytest.

User Reviews

0.0 out of 5
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0

No reviews yet. Be the first to review this course.

There are no reviews yet.

Write your review

Reviews can only be posted by registered learners. Log in, then you will return here to post.

×

    Report this page
    Case Study: Building Software in Python
    Case Study: Building Software in Python
    LiveTalent
    Logo
    Compare items
    • Total (0)
    Compare
    0