Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.25 KB

File metadata and controls

35 lines (22 loc) · 1.25 KB

Python Calculator Project

NOTE: This project has been abandoned in favour of creating small CLI projects to satisfy course requirements. See main repository for that here.

Goal

This project is made to try to fulfill this requirement:

"I'll make a calculator project to demonstrate several recursive algorithms (Fibonacci, exponents, factorials, palindromes, combinations, greatest common factor)"

It is currently not functional, as I'm in the middle of an overhaul of its structure.

Functions

This calculator GUI uses Python's eval() function, so Python expressions are used for calculations.

Python's math library is imported using import math, so any functions from that may be used. Some of these functions are reimplemented in the local namespace, including:

  • factorial(n: int) -> int: Calculates the factorial using a for loop, and returns a ValueError when negative numbers or integers are used.

Sub-Projects

The teacher required that certain things were first implemented apart from this project, to make them clear from the structural code of it.

Their repositories are linked here: