Skip to content

A simple Python function that formats a short list of equations vertically.

Notifications You must be signed in to change notification settings

Rustic-Citrus/arithmetic-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arithmetic Formatter

Author: Harry Stuart Curtis

Published: 2023-09-23

Last Updated: 2024-01-23

Introduction

This is a simple Python function that takes a list of addition or subtraction problems containing two operands each, then prints the equation to the command line in the traditional vertical layout. For example, the format of the input string could be, "134 + 21" or "308 - 75", but not "500 + 200 + 437". Additionally, the function takes an optional second boolean argument to determine whether the equation should show the solution.

This project is part of the Scientific Computing with Python course on freeCodeCamp. For more information, click on this link to visit the assignment prompt.

Getting Started

Setup

To test that this function works, you will need to have access to a command-line interface and the internet. Also, you will need to have Python and Git installed on your machine.

Running the application

  1. Clone the project to your local machine. This will create a copy of the repository on your computer:
git clone https://github.com/Rustic-Citrus/arithmetic-formatter.git
  1. Next, make sure you are in the correct directory. You will probably have to change directory:
cd arithmetic-formatter
  1. Run the application.
python main.py

Instructions

Follow the instructions in the command line interface when running the application.

The application will automatically run a series of tests provided by freeCodeCamp to demonstrate that it meets the requirements for the activity, but there is an input prompt afterwards that allows you to test the function yourself.

Thanks

Thank you for showing an interest in my work! Please take the time to see my other projects on my GitHub profile or on my website.

About

A simple Python function that formats a short list of equations vertically.

Topics

Resources

Stars

Watchers

Forks

Languages