Skip to content

A set of Python classes demonstrating object-oriented capabilities for data comparison, conversion, and validation. Each class performs unique tasks such as time management, currency conversion, validating employee data, and comparing student grades.

Notifications You must be signed in to change notification settings

nurlibekrauan/-Comparison-methods-__eq__-__ne__-__lt__-__gt__-and-others-Python-OOP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

КАРОЧЕ МНЕ ЛЕНЬ ВСЕ ОБЪЯСНЯТЬ САМИ РАЗБИРИТЕСЬ

-Comparison-methods-eq-ne-lt-gt-and-others-Python-OOP

A set of Python classes demonstrating object-oriented capabilities for data comparison, conversion, and validation. Each class performs unique tasks such as time management, currency conversion, validating employee data, and comparing student grades.

Object-Oriented Python Utilities for Comparison and Conversion

Object-Oriented Python Utilities for Comparison and Conversion

Description

This project includes several useful Python classes that implement features such as:

  • Comparison operations
  • Currency conversion
  • Time interval management
  • Attribute validation for objects like employees and files

Each file represents a distinct class and supports specific methods for performing comparison operations, mathematical operations, and data validation. This project is ideal for those learning object-oriented programming and operator overloading in Python.

Contents

1. tx.py - Class Student

The Student class is used to create student objects with a name and grades. Comparison is based on average grade.

Examples:

student1 = Student("Alice", [90, 80, 89])
student2 = Student("Bob", [85, 75, 95])
print(student1 == student2)  # False
print(student1 > student2)   # True
### tx2.py - Class TimeInterval
The TimeInterval class helps manage time intervals and allows addition and subtraction of time intervals.
```python
interval1 = TimeInterval(hours=1, minutes=30)
interval2 = TimeInterval(hours=2, minutes=15)
print(interval1 == interval2)  # False
print(interval1 < interval2)   # True

About

A set of Python classes demonstrating object-oriented capabilities for data comparison, conversion, and validation. Each class performs unique tasks such as time management, currency conversion, validating employee data, and comparing student grades.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages