Scientific Computing with Python Projects from freeCodeCamp
There are five projects that must be completed in order to obtain the Scientific Computing with Python Certification from freeCodeCamp. This repository contains every piece of Python code I've written.
- Arithmetic Formatter.
Primary school students often arrange math problems vertically to make them simpler to solve. The goal of this project is to create a function that receives a list of strings representing arithmetic problems and returns the problems stacked vertically. The function should accept the second argument as an option. When the second argument is set to True, the responses should be displayed. You can read more about it here or run the code directly from my replit.
- Time Calculator
In this project, I need to create add_time
function that takes in two required parameters and one optional parameter: a start time in the 12-hour clock format (ending in AM or PM); a duration time that indicates the number of hours and minutes; and a starting day of the week (optional), case insensitive. The function should add the duration time to the start time and return the result. You can read more about it here or run the code directly from my replit.
- Budget App
In this project, I was asked to make a Category
class that would be able to instantiate objects based on different budget categories like food, clothing, etc. It is supposed to have deposit
and withdrawal
method that accepts an amount and description to track the flow of money, get_balance
method that returns the current balance of the budget category, transfer
method that transfers an amount to another budget category, and a check_funds
method to check whether the transaction can be made with the current balance in consideration. When the budget object is printed, it would display the name of the category, the transaction list, and the current balance. Besides the Category
class, I was asked to create a function (outside of the class) called create_spend_chart
that takes a list of categories as an argument and returns a string that is a bar chart. You can read more about it here or run the code directly from my replit.
- Polygon Area Calculator
In this project, I employ object-oriented programming to develop the classes Rectangle
and Square
. I must ensure that the Square
class in this project is a subclass of Rectangle
and inherits its methods and attributes. You can read more about it here or run the code directly from my replit.
- Probability Calculator
For this project, I write a program that will run a large number of experiments to estimate the probability of drawing specific balls at random from a hat. This program would provide an estimated probability for questions such as "Assume a hat contains 5 blue balls, 4 red balls, and 2 green balls. What is the likelihood that a random draw of four balls will include at least one red ball and two green balls?" You can read more about it here or run the code directly from my replit.