Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

project11.py

Python Projects- yousef

Overview

This repository contains three Python projects designed for managing time, fractions, and basic mathematical calculations. They are combined to help you handle various tasks efficiently.

projects

1. Time Management (File: test3.py)

. Description: A Time class to manage hours, minutes, and seconds.

. Features :

  • Automatically adjusts time (e.g., excess seconds convert to minutes).
  • Displays time in HH: MM: SS format.

. Use Case : Ideal for time-tracking applications.

. How to Run : Open test3.py and run python test3.py.

2. Fraction Management (File: test2.py)

. Description : A Fraction class for working with fractions.

. Features :

  • Addition and multiplication of fractions.
  • Auto-simplifies fractions (e.g., 2/4 to 1/2).
  • Displays fractions as s/m.

. Use Case : Useful for mathematical calculations with fractions.

. How to Run : Open test2.py and run python test2.py.

3. Fraction Calculations (File: test1.py)

. Description : Functions for addition, multiplication, and converting fractions to decimals.

. Features :

  • sum: Adds two fractions.
  • mul: Multiplies two fractions.
  • fraction_to_number: Converts a fraction to a decimal (checks for division by zero).
  • Auto-simplifies results. . Use Case : Quick fraction calculations without a class. . How to Run :Open test1.py and run python test1.py.

Prerequisites

  • Python 3.x installed.
  • A code editor like VS Code (optional).

How to Run

  1. Open the desired file (test1.py, test2.py, or test3.py).
  2. In the terminal, run python filename.py(e.g., python test1.py).
  3. Check the output and enjoy!

Notes

  • If you encounter errors(e.g., division by zero), check initial values(e.g., avoid setting denominators to zero).
  • Edit the code add features or test changes.

yousef damqani

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages